I have the following login page
<FORM ACTION="login.asp" method="Post" name="login" onsubmit="return validate(this);">
<td align=left bgcolor=#ffff99>
<p><b><FONT color="#009933">username</B><br><INPUT TYPE="text" NAME="Username" VALUE="" SIZE="20"><p><b><FONT color="#009933">Password</b><br><INPUT TYPE="text" NAME="Password" VALUE="" SIZE="20"><br>
<P><INPUT TYPE="submit" NAME="Submit">
</form>
Which passes everything over fine to this page
<%Language="VBScript"%>
<%
Dim strSQL, objConn, objRS
strusername = request.form("Username")
strpassword = request.form("Password")
strSQL = "SELECT * from tblUsers where fldUsername = ' & Username ' & fldPassword = ' & password '"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "TPVORCDSN"
Set objRs=objConn.Execute(strSQL)
if objRs.bof then
session("message") = "Your Login details were incorrect."
response.redirect("end if
session("fldUsername") = objRs("fldUsername")
response.redirect("
%>
But i want it so that on this next page it writes hello SiJohn101 I have tried this but to no avail. here is what is on the next page.
<%
Session("Username") = username
Response.write("Hello " & username)
%>
Cheers
<FORM ACTION="login.asp" method="Post" name="login" onsubmit="return validate(this);">
<td align=left bgcolor=#ffff99>
<p><b><FONT color="#009933">username</B><br><INPUT TYPE="text" NAME="Username" VALUE="" SIZE="20"><p><b><FONT color="#009933">Password</b><br><INPUT TYPE="text" NAME="Password" VALUE="" SIZE="20"><br>
<P><INPUT TYPE="submit" NAME="Submit">
</form>
Which passes everything over fine to this page
<%Language="VBScript"%>
<%
Dim strSQL, objConn, objRS
strusername = request.form("Username")
strpassword = request.form("Password")
strSQL = "SELECT * from tblUsers where fldUsername = ' & Username ' & fldPassword = ' & password '"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "TPVORCDSN"
Set objRs=objConn.Execute(strSQL)
if objRs.bof then
session("message") = "Your Login details were incorrect."
response.redirect("end if
session("fldUsername") = objRs("fldUsername")
response.redirect("
%>
But i want it so that on this next page it writes hello SiJohn101 I have tried this but to no avail. here is what is on the next page.
<%
Session("Username") = username
Response.write("Hello " & username)
%>
Cheers