Ive been working on a simple data base on my IIS and have created a funtional login system. However when I went to create a sign up site for my page I keep getting errors. This is my text. All errors end up around were im attempting to edit it and add a new user.
Text:
<% option explicit %>
<html>
<!--#include virtual="/login/adovbs.inc"-->
<head>
<title>TESTING HTML-ASP</title>
<style type="text/css">
a.a:link {color=#000000}
a.a:visited {color=#000000}
a.a:hover {color=#3300CC}
h1 {font-family: Crass;font-size: 350%}
h3 {font-family: Crass;font-size: 200%}
</style>
</head>
<body bgcolor="#696969">
<table cellpadding="4" border="1" bgcolor="#708090">
<tr>
<td align="center" width="832"><h1>TESTING HTML-ASP</td>
</tr>
</table>
<div align="center">
<table cellpadding="4" border="1" align="left" bgcolor="#808080">
<tr>
<td width="100" height="600" align="center" valign="top">
<b>Links:</b><br>
<a href="http://localhost/asp/helloworld.asp" class="a">Hello World</a><br>
<a href="http://localhost/asp/cost+tax.asp" class="a">Cost+Tax</a><br>
<a href="http://localhost/asp/date.asp" class="a">Date</a><br>
<a href="http://localhost/asp/strings.asp" class="a">Strings</a><br>
<a href="http://localhost/asp/strings2.asp" class="a">Strings2</a><br>
<a href="http://localhost/asp/fontsize.asp" class="a">Font Size</a><br>
<a href="http://localhost/asp/daynumber.asp" class="a">Day Number</a><br>
<a href="http://localhost/asp/random.asp" class="a">Random #</a><br>
<a href="http://localhost/asp/testingtxt.asp" class="a">Test Txt</a><br>
</td>
</td>
</tr>
</table>
<table cellpadding="4" border="1" align="left">
<tr>
<td width="600" height="600" valign="top">
<% dim a
a=0%>
<% if request.form("user")="" and request.form("pass1")="" and request.form("pass2")="" and request.form("email")="" or request.form("pass1")<>request.form("pass2") then %>
<% a=a+1 %>
<h3>Sign Up</h3><br>
<% if a<>1 then%><b>Error: You did not fill in all of the form properly.</b><br><%else%>
It is very easy to sign up to our secure server so that you can test you asp scripts.<br>
Just fill out the form below and you will be one step closer to becoming a testing site member.<br>
<form action="createnew.asp" method="post">
User Name:<center><input type="text" name="user"></center>
Password:<center><input type="password" name="pass1"></center>
Verify Password:<center><input type="password" name="pass2"></center>
Email:<center><input type="text" name="email"><br><br>
<a href="agreement.asp" class="a">Rules and Regulations</a><br><br>
<input type="submit" value="I Agree to the Rules and Regulations"></form>
<form action="noagreement.asp" method="post"><input type="submit" value="I Do Not Agree">
</form>
<% end if %>
<% else
dim connect, info, query
set connect=server.createobject("ADODB.Connection")
connect.open "info"
set info=server.createobject("ADODB.Recordset")
query= "SELECT * FROM info " _
& "WHERE User='" & Replace(Request.Form("user"), "'", "''") & "' "
info.open query, connect, adOpenDynamic, adLockOptimistic, adCmdText
'here is were the error occures*******************************
if info.EOF then
info.addnew
info("User")=request.form("user")
info("Password")=request.form("pass1")
info("Email")=request.form("email")
info.update
else %>
This user is already taken. Please think of a new username and fill out the
<a href="createnew.asp" class="a">form</a>.
<% end if %>
<% end if %>
</td>
</tr>
</table>
<table cellpadding="4" border="1" align="left" bgcolor="#808080">
<tr>
<td width="100" height="600" valign="top">
</td>
</tr>
</table>
</div>
</body>
</html>
Thanks for taking a look and hope u can find whats bugging it.
Text:
<% option explicit %>
<html>
<!--#include virtual="/login/adovbs.inc"-->
<head>
<title>TESTING HTML-ASP</title>
<style type="text/css">
a.a:link {color=#000000}
a.a:visited {color=#000000}
a.a:hover {color=#3300CC}
h1 {font-family: Crass;font-size: 350%}
h3 {font-family: Crass;font-size: 200%}
</style>
</head>
<body bgcolor="#696969">
<table cellpadding="4" border="1" bgcolor="#708090">
<tr>
<td align="center" width="832"><h1>TESTING HTML-ASP</td>
</tr>
</table>
<div align="center">
<table cellpadding="4" border="1" align="left" bgcolor="#808080">
<tr>
<td width="100" height="600" align="center" valign="top">
<b>Links:</b><br>
<a href="http://localhost/asp/helloworld.asp" class="a">Hello World</a><br>
<a href="http://localhost/asp/cost+tax.asp" class="a">Cost+Tax</a><br>
<a href="http://localhost/asp/date.asp" class="a">Date</a><br>
<a href="http://localhost/asp/strings.asp" class="a">Strings</a><br>
<a href="http://localhost/asp/strings2.asp" class="a">Strings2</a><br>
<a href="http://localhost/asp/fontsize.asp" class="a">Font Size</a><br>
<a href="http://localhost/asp/daynumber.asp" class="a">Day Number</a><br>
<a href="http://localhost/asp/random.asp" class="a">Random #</a><br>
<a href="http://localhost/asp/testingtxt.asp" class="a">Test Txt</a><br>
</td>
</td>
</tr>
</table>
<table cellpadding="4" border="1" align="left">
<tr>
<td width="600" height="600" valign="top">
<% dim a
a=0%>
<% if request.form("user")="" and request.form("pass1")="" and request.form("pass2")="" and request.form("email")="" or request.form("pass1")<>request.form("pass2") then %>
<% a=a+1 %>
<h3>Sign Up</h3><br>
<% if a<>1 then%><b>Error: You did not fill in all of the form properly.</b><br><%else%>
It is very easy to sign up to our secure server so that you can test you asp scripts.<br>
Just fill out the form below and you will be one step closer to becoming a testing site member.<br>
<form action="createnew.asp" method="post">
User Name:<center><input type="text" name="user"></center>
Password:<center><input type="password" name="pass1"></center>
Verify Password:<center><input type="password" name="pass2"></center>
Email:<center><input type="text" name="email"><br><br>
<a href="agreement.asp" class="a">Rules and Regulations</a><br><br>
<input type="submit" value="I Agree to the Rules and Regulations"></form>
<form action="noagreement.asp" method="post"><input type="submit" value="I Do Not Agree">
</form>
<% end if %>
<% else
dim connect, info, query
set connect=server.createobject("ADODB.Connection")
connect.open "info"
set info=server.createobject("ADODB.Recordset")
query= "SELECT * FROM info " _
& "WHERE User='" & Replace(Request.Form("user"), "'", "''") & "' "
info.open query, connect, adOpenDynamic, adLockOptimistic, adCmdText
'here is were the error occures*******************************
if info.EOF then
info.addnew
info("User")=request.form("user")
info("Password")=request.form("pass1")
info("Email")=request.form("email")
info.update
else %>
This user is already taken. Please think of a new username and fill out the
<a href="createnew.asp" class="a">form</a>.
<% end if %>
<% end if %>
</td>
</tr>
</table>
<table cellpadding="4" border="1" align="left" bgcolor="#808080">
<tr>
<td width="100" height="600" valign="top">
</td>
</tr>
</table>
</div>
</body>
</html>
Thanks for taking a look and hope u can find whats bugging it.