austenr
05-23-2007, 12:45 PM
Hi,
I am trying to learn how to do this. I have the following HTML code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Process form data with Post method</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form method="post" action="process.asp" name="form1"
<table width="70%" border="0" cellspacing="0" cellpadding="0"
<tr>
<td>name:</td>
<td colspan="2"><input type="text" name="name"</td>
</tr>
<tr>
<td>email:</td>
<td colspan="2"><input type="text" name="email"></td>
</tr>
<tr>
<td>comments:</td>
<td colspan="2"><textarea name="comment" cols="40" rows="5"></textarea></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><input type="submit" name="Submit" value="Submit"</td>
</tr>
</table>
</form>
</body>
</html>
Which works with no problem until I hit the submit button. When I do I get a message box asking if im sure I want to open the ASP page.
ASP Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Submitted Data</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
Dim name,email, comment
name=Request.Form("name")
email=Request.Form("email")
comment=Request.Form("comment")
response.write("Name: " & name "<br>")
response.write("Email " & email "<br>")
response.write("Comments: " & comment & "<br>")
%>
</body>
</html>
I know that this is simple example to a lot of you but I don't know what I am doing incorrectly. Thanks
BTW - both examples are in the same folder on a server.
I am trying to learn how to do this. I have the following HTML code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Process form data with Post method</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form method="post" action="process.asp" name="form1"
<table width="70%" border="0" cellspacing="0" cellpadding="0"
<tr>
<td>name:</td>
<td colspan="2"><input type="text" name="name"</td>
</tr>
<tr>
<td>email:</td>
<td colspan="2"><input type="text" name="email"></td>
</tr>
<tr>
<td>comments:</td>
<td colspan="2"><textarea name="comment" cols="40" rows="5"></textarea></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><input type="submit" name="Submit" value="Submit"</td>
</tr>
</table>
</form>
</body>
</html>
Which works with no problem until I hit the submit button. When I do I get a message box asking if im sure I want to open the ASP page.
ASP Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Submitted Data</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
Dim name,email, comment
name=Request.Form("name")
email=Request.Form("email")
comment=Request.Form("comment")
response.write("Name: " & name "<br>")
response.write("Email " & email "<br>")
response.write("Comments: " & comment & "<br>")
%>
</body>
</html>
I know that this is simple example to a lot of you but I don't know what I am doing incorrectly. Thanks
BTW - both examples are in the same folder on a server.