|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
>>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. |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
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.
|
|
#5
|
|||
|
|||
|
Ok, now how do I SET the 12345 value to a hidden field value from the html page?
|
|
#6
|
|||
|
|||
|
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/ |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > How To Capture Unique Token |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|