[HTML - PHP] - Retrieve the value of a label

Solved
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:
<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

Sandriine Posted messages 1400 Status Membre 283
 
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
0
Samy
 
At the limit, you can try and see that it returns nothing lol ^^

To be honest, I don't see the point either; with forms, you can still solve all the problems without needing to look for information in the labels (lol)
0
ben85350 Posted messages 622 Status Membre 27
 
Thank you for your quick and clear responses!
0