Click to See Complete Forum and Search --> : request.Form("field") not working


calliepeck
03-14-2006, 03:36 PM
I've been coding away at this script for several days now and haven't been able to figure out what's wrong. Once I decided to go back to basics with a simple form and one line request.Form("field") response, I realised that the request object with form method just isn't working.

I've tried writing myself, copying simple scripts, etc. Other asp VBscript objects and methods work, so I know that my localhost recognises the lanugage. Does anyone have any further tests or advice? It's driving me mad. I have no idea why that alone would choose to quit working!

JayM
03-14-2006, 04:02 PM
Please post the complete code that is not working.

Request.Form("field") alone isn't going to show you anything on its own. You would have to use something else. Try this:


strString = Request.Form("field")
Response.Write (strString)

calliepeck
03-14-2006, 04:13 PM
Sorry, I was just generalizing.

Silly little things like:

<html>
<form method="post" action="process.asp">
<input type="text" name="car">
<input type="submit" value="submit">
</form>
</html>


and then processed at process.asp

<%
Dim cars
cars=Request.Form("car")

response.write(cars)
%>



Things like this produce nothing, which causes some big trouble when trying to combine request variables into an SQL statement in a much more complex application.

JayM
03-14-2006, 04:21 PM
Weird. That script works perfectly fine on my computer. See what happens when you type method="get".