PDA

Click to See Complete Forum and Search --> : Please - cannot get to grips with this


turfbult
Mar 8th, 2001, 05:35 AM
Hello,

I'm new to querystrings and find it to work very well, but I'm having some trouble!!

I have set up a test page where I must enter a email address in an inputbox and then send that which I entered to the next page (nextpage.asp). In nextpage.asp I just have ....

myvar = request.querystring("email")
response.write myvar

Hopefully I then see whatever I entered in the inputbox!!

Now this is how I do it. I send the variable(email) with the form to nextpage.asp - this works 100% if I hardcode the email address, but how can I send whatever I entered into the inputbox (email) using querystrings??? I know I can submit/post the whole form and get it in nextpage.asp with request.form("email"), but I DO NOT what to do it like this!!

Can this be done??

Any help please,
T

<html>

<head>
<title>New Page 1</title>
</head>

<body>

<form method="POST" action="nextpage.asp?email=turfbult@vbworld.net">
<p><input type="text" name="email" size="20"><input type="submit" value="Submit" name="btnSubmit"></p>
</form>
</body>
</html>

Jeh
Mar 8th, 2001, 05:59 AM
Morning:),

2 things to do, firstly if you want to send form info thro the querystrign and not use Request.Form("email") then set the method of the form to GET instead of post, then remove the ?email=blahblah from the action of the form, with GET the form details will be appended to the querysting on submitting the form, with POST they sre sent for use with Request.Form.

Hope that helps:)