I am trying to get a form to verify that the name and email fields are valid before it submits the form to another page. But, I cannot get it to work. Here is my ASP:
<%
If Request.Form("SubmitButton" = "Submit" Then
Name = Request.Form("Name"
Email = Request.Form("Email"
If Name = "" Then
NameMessage = "Invalid Name"
End If
If InStr(Email,"@"=0 Then
EmailMessage = "Invalid E-Mail"
End If
If NameMessage = "" and EmailMessage = ""
Response.Redirect("DisplayPage.asp?Name=" & Name & "&Email=" & Email)
End If
End If
%>
<html>
<body>
<form method="get" name="Logon" action="FormPage.asp">
<table border=1 width="362">
Then comes the rest of the page.. any idea what I am doing wrong? It is giving me a 500 server error. Thanks!
<%
If Request.Form("SubmitButton" = "Submit" Then
Name = Request.Form("Name"
Email = Request.Form("Email"
If Name = "" Then
NameMessage = "Invalid Name"
End If
If InStr(Email,"@"=0 Then
EmailMessage = "Invalid E-Mail"
End If
If NameMessage = "" and EmailMessage = ""
Response.Redirect("DisplayPage.asp?Name=" & Name & "&Email=" & Email)
End If
End If
%>
<html>
<body>
<form method="get" name="Logon" action="FormPage.asp">
<table border=1 width="362">
Then comes the rest of the page.. any idea what I am doing wrong? It is giving me a 500 server error. Thanks!