Re: Getting LABEL for=...
- From: Erwin Moller <since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx>
- Date: Tue, 28 Feb 2006 13:14:56 +0100
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
.
- Follow-Ups:
- Re: Getting LABEL for=...
- From: Paul Lautman
- Re: Getting LABEL for=...
- References:
- Getting LABEL for=...
- From: Paul Lautman
- Getting LABEL for=...
- Prev by Date: Re: XML parser
- Next by Date: PHP5 core programming
- Previous by thread: Getting LABEL for=...
- Next by thread: Re: Getting LABEL for=...
- Index(es):
Relevant Pages
|