[HTML - PHP] - Retrieve the value of a label
Solved
ben85350
Posted messages
622
Status
Membre
-
ben85350 Posted messages 622 Status Membre -
ben85350 Posted messages 622 Status Membre -
Hello,
I would like to know if it is possible to retrieve the value contained in a label in HTML via the POST method in PHP
See the example below:
Thank you for your help!
I would like to know if it is possible to retrieve the value contained in a label in HTML via the POST method in PHP
See the example below:
<form action="maPage.php" method="POST"> <label name="monLabel">label text</label> <input type="submit" value="Validate" name="validate" /> </form> <?php echo $POST['monLabel']; ?>
Thank you for your help!
Configuration: Windows XP Firefox 3.0.8
3 réponses
The label is a tag that helps improve the usability of an HTML form; it wraps around one (or more) tags that contain data, but it does not store data itself...
In fact, you need to retrieve the value of the element to which your label refers, not the label itself.
P.S.: A label alone is useless...
Best regards,
Sandrine
In fact, you need to retrieve the value of the element to which your label refers, not the label itself.
P.S.: A label alone is useless...
Best regards,
Sandrine