- Sep 14, 2004
- 294
- 0
- 0
I have to make my websites shopping cart have a log in for existing user. I basically just need a good if statement. I also might note that it is linked to access. I have been working on it since 4pm yesterday.
Login Code:
<html>
<head><title>Simple HTML Form</title></head>
<body>
<form method="post" action="LoginResult.asp">
<b>Email Address: </b>
<input name="txtEmail" type="text" size=30>
<p>
<b>Password: </b>
<input name="txtPassword" type="password" size=10>
<p>
<input type="submit" value="LOGIN">
</form>
</body>
</html>
Login Result:
<%
Dim CustEmail as String
Dim CustPassword as String
CustEmail = Request.Form("txtEmail")
CustPassword = Request.Form("txtPassword")
'connect to Customer table
<%
set dbMain = server.createobject("ADODB.Connection")
dbMain.open session("dblogin")
Set rsCustomer = Server.CreateObject("ADODB.Recordset")
sSQL = "SELECT * FROM Customer_t WHERE Email_ID = '" & CustEmail & "'" & _
" and Password = '" & CustPassword & "'"
rsCustomer.open sSQL, dbMain, adopenstatic, adlockpessimistic, adcmdtext
%>
<% if rsCustomer.eof then %>
%>
Any help is appreciated.
Login Code:
<html>
<head><title>Simple HTML Form</title></head>
<body>
<form method="post" action="LoginResult.asp">
<b>Email Address: </b>
<input name="txtEmail" type="text" size=30>
<p>
<b>Password: </b>
<input name="txtPassword" type="password" size=10>
<p>
<input type="submit" value="LOGIN">
</form>
</body>
</html>
Login Result:
<%
Dim CustEmail as String
Dim CustPassword as String
CustEmail = Request.Form("txtEmail")
CustPassword = Request.Form("txtPassword")
'connect to Customer table
<%
set dbMain = server.createobject("ADODB.Connection")
dbMain.open session("dblogin")
Set rsCustomer = Server.CreateObject("ADODB.Recordset")
sSQL = "SELECT * FROM Customer_t WHERE Email_ID = '" & CustEmail & "'" & _
" and Password = '" & CustPassword & "'"
rsCustomer.open sSQL, dbMain, adopenstatic, adlockpessimistic, adcmdtext
%>
<% if rsCustomer.eof then %>
%>
Any help is appreciated.
