#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    13
    Rep Power
    0
    I am a newbie cgi programmer so please bare with me...

    I have a mail capture form on a web page. I want to pass a token to the mail capture cgi (which has already been set up and will accept the token)

    I know how to generate the token and pass it to the html page (using ?12345 in the url.) But I can't figure out how to pass the token along to the mail capture cgi when the user presses submit.

    Can anyone help?
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>I have a mail capture form on a web page

    No idea what "mail capture" is.

    >>(using ?12345 in the url.)
    >>how to pass the token along to the mail capture cgi when the user presses submit

    Use hidden field. You are better off setting a variable name to 12345.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    13
    Rep Power
    0
    I meant to say an email capture form.

    The user enters their name and email address to subscribe to join my email list. When they press submit their name and email address are sent to a cgi program that enters them into a database. I need to know how to send a number that was passed in the URL to the CGI program.

    For example, the url that they surf to is http://www.mysite.com?12345

    Then they fill out the form and press submit. How do I pass the 12345 to the cgi program? Note: 12345 is a token that is different each time.
  6. #4
  7. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Use $ENV{QUERY_STRING}, it will have the 12345 value. You should use Form POST and set the 12345 value to be a hidden field value.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    13
    Rep Power
    0
    Ok, now how do I SET the 12345 value to a hidden field value from the html page?
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    4
    Rep Power
    0

    Easy, just add a line like this into your form:
    <input type="hidden" name="something" value="12345">

    Mike


    ------------------
    Envex Developments
    Your CGI Script Specialists
    http://www.envex.net/

IMN logo majestic logo threadwatch logo seochat tools logo