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

Solved
ben85350 Posted messages 622 Status Member -  
ben85350 Posted messages 622 Status Member -
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 answers

  1. Sandriine Posted messages 1400 Status Member 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
  2. 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
  3. ben85350 Posted messages 622 Status Member 27
     
    Thank you for your quick and clear responses!
    0