php post $_POST noob question

Discussion in 'PHP' started by ironmankho, Dec 23, 2012.

  1. #1
    hi

    as we know that in Php $_POST variable


    example taken form : _http://www.w3schools.com/php/php_post.asp
    <form action="welcome.php" method="post">
    Name: <input type="text" name="fname">
    Age: <input type="text" name="age">
    <input type="submit">
    </form>

    we use input type=" " to pass value is there any other method to pass hidden value to $_POST variable.....i want hidden form when user click on
    [click here](no submit form/input type="submit")
    Thanks
     
    ironmankho, Dec 23, 2012 IP
  2. ironmankho

    ironmankho Active Member

    Messages:
    393
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #2
    <input type="hidden" name="var" value="<?php echo $value?>" />
    solved
     
    ironmankho, Dec 23, 2012 IP
  3. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #3
    Why would you want the value in a hidden element of the form if PHP already knows the value?
     
    Rukbat, Dec 24, 2012 IP
  4. gether

    gether Member

    Messages:
    87
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #4
    are you trying to GET the value from the name ?
     
    gether, Dec 25, 2012 IP
  5. hiflyer.vn

    hiflyer.vn Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    maybe you can use jquery to get value from other element
     
    hiflyer.vn, Dec 25, 2012 IP