+ Reply to Thread
Results 1 to 4 of 4

Thread: Hidden Tags

  1. #1
    Full Member Steveo31 is on a distinguished road
    Join Date
    Jan 2004
    Posts
    40

    Hidden Tags

    I just got off of php.net reading a post about posting info to a mailform.php type page. As of now, the script isn't important. What I would like to know, is how the variables get posted. The address ends up being

    http://www.site.com/mailform.php?ema...&type=textonly

    Stuff like that, and someone said it was a hidden tag. Could someone clear this up? Thanks a lot.

    -S

    edit...

    It ain't showing up right here... basically it is the web address with all the var names after it.
    Last edited by Steveo31; February 13th, 2004 at 01:11 AM.

  2. #2
    Full Member dzone is on a distinguished road
    Join Date
    Dec 2003
    Posts
    75
    That is not a hidden tag, but just a standard GET request, when the variables are stored in the URL.

    The hidden tag works with both GET/POST requests, that depends on the form's settings:

    That is for POST

    Code:
    <form name=myform method=post action="./">
    <input type=hidden name=hiddentag value=test>
    </form>
    and that is for GET

    Code:
    <form name=myform method=get action="./">
    <input type=hidden name=hiddentag value=test>
    </form>
    In the first case the var will be stored in $_POST superglobal, in the second = in $_GET and it will be also visible in URL, so the first method is handy to pass user input between forms (e.g. password hash) and user won't see the ugly URL.

    HTH,
    Z.

  3. #3
    Full Member Steveo31 is on a distinguished road
    Join Date
    Jan 2004
    Posts
    40
    Ahh I see. Thanks again

  4. #4
    yeah, pretty much, PHP provides a standard way off handling form submits, because forms are used a lot on the web.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts