You are here: Re: Getting LABEL for=... « PHP Programming Language « IT news, forums, messages
Re: Getting LABEL for=...

Posted by Erwin Moller on 02/28/06 14:14

Paul Lautman wrote:

> Hi y'all,
> is there anyway that I can get the <LABEL for=... data from a form in PHP.
>
> For example, if I have
>
> <label for="name">Full name</label><br>
> <input type="text" size="40" name="name" id="name"></p>
>
> Can I get the fact that the label for "name" is "Full name"
>
> TIA
> Regards
> Paul


Hi Paul,

yes and no.

No: In your current setup you just send the formelements to PHP.
Tip: You can ALWAYS check what PHP receives by printing the $_POST, like
this:

<pre>
<?
print_r($_POST);
?>
</pre>

(The pre's are important, if you don't use them, it will be difficult to
decypher.)

----------------

Yes, by adding extra info to your form, probably with a hidden variable,
like this:
<input type="hidden" name="labelforname" value="Full name">


Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация