Passing info between pages.

liunx

Guest
Hi,<br />
I want to pass an email address from one page to another where it is used in a form.<br />
<br />
I don't want to use the "mailto:" statement to invoke my email application. Instead I want to click on a link (as if it was a "mailto:" link) that holds the email address of the intended recipient and then replace the page with the email form page using the same frame.<br />
<br />
The email form page will then take this email address supplied by the link, and put it into the appropriate form field for submission to my cgi script (perlscript).<br />
<br />
My email form is done and my cgi script is done and working (I used a 'hardcoded' email address to test it).<br />
<br />
I know I can use the URL to carry this information, but I don't know how.<br />
<br />
Can anyone help me please.<br />
<br />
Many thanks in advance.<!--content-->well yea you definatly need a server side language and cgi is one. I suggest using a query string but I do not know cgi so this would be more of a question for the cgi forum.<!--content-->Hi,<br />
Thanks for your reply. I am confused or maybe I didn't describe what I wanted well enough. I thought I could pass it to the next page using a "decorated url" without the need to use cgi script. Essentially it's only a text string at this point. I have played with them before for another problem but never got them to work.<br />
<br />
Thanks again.<!--content-->What I'm guessing here, is that in your form you want to use a method of "get" instead of "post" because "get" adds the info being sent as part of the URL. For an e-mail form though, I would use "post" instead.<!--content-->Hi,<br />
I'm not having a good day.<br />
<br />
Obviously the pages are "served" from my host. But I don't think it needs to go to a cgi script at this point.<br />
<br />
With "mailto:" you can add a subject and body etc.. But I want to do it a little differently. My CGI script can format it for me etc..<br />
<br />
All I want to do is pass it to another page without using cookies and treat as a string and not as an email address.<br />
<br />
I want some javascript that will extract the string from the URL in the next page and create the email address for me. I want to do it this way because there are different links and consequently the email address of the recipient will be different and I want a different message depending on who it's for.<br />
<br />
The link (which ever one they click) will pass the information to my email form on another page. They then fill in there message etc.. and click submit, then it goes to my cgi script. I'm not worried about my perlscript in the cgi-bin, I have that sorted.<br />
<br />
I know I have to "escape" the string, but I am still confused. I used to use cookies without problems, but not everyone has cookies enabled.<br />
<br />
Sorry if I'm being a pain it's totally my fault for not explaining more fully.<br />
<br />
Thanks again<!--content-->Java script is not the answer. Java script is insecure and can be a security risk, it is also disabled for 13% of users. If a users machine has it disabled and they go to your site they will get a mountain of errors. I suggest doing it all server side.<!--content-->Javascript is disabled by 13% of users, yet nearly 90% of private websites use it - Sorry, that's their loss.<br />
<br />
Why is it insecure? You can't read or write files with it (with the exception of cookies)?<br />
<br />
Oh well.<br />
<br />
Thanks anyway<!--content--><a href=http://www.webdeveloper.com/forum/archive/index.php/"/cgi-bin/[email protected]">Email Somebody</a> |<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/cgi-bin/[email protected]">Email Nobody</a> |<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"/cgi-bin/[email protected]">Email Anybody</a><br />
<br />
Is this what you were looking for?<!--content-->Originally posted by learninghtml <br />
Javascript is disabled by 13% of users, yet nearly 90% of private websites use it - Sorry, that's their loss.<br />
<br />
Why is it insecure? You can't read or write files with it (with the exception of cookies)?<br />
<br />
Oh well.<br />
<br />
Thanks anyway It is a security risk because all the code is in your source. The user can just write in the ookie theirself etc. That is why it is insecure. Java script also tends to lag more then server side scripts. Also yest many sites use it but it is usually for layout and design, those sites have a backup and do not depend on it.<!--content-->Originally posted by nkaisare <br />
Is this what you were looking for? <br />
<br />
Hi,<br />
It sure is! Thank you, Thank you, Thank you.<br />
<br />
I didn't see your post until now for some reason, never got the email????<br />
<br />
Thank you again.<br />
<br />
Best regards<!--content-->
 
Back
Top