Hello Friend!
I am new for ASP. Database is Microsoft Access. So pls help me.....
My problem is ---
1. In login page, two text boxs. first textbox is username & second textbox is Password. Password is Date of Birth.
If DOB is starting 09-08-90 or 11-01-91 is not login or DOB is starting more than 13 (13-03-91 or 28-11-91) is succefully login.
2. So I check, How? the date is print. Below code
3. How i can solve this?
4.Because in my program, I check the ( if rs("DOB")= CDate(pwd) then)
Pls check the below coding... and reply me immediately is very very urgent advances thanks.......
I am new for ASP. Database is Microsoft Access. So pls help me.....
My problem is ---
1. In login page, two text boxs. first textbox is username & second textbox is Password. Password is Date of Birth.
If DOB is starting 09-08-90 or 11-01-91 is not login or DOB is starting more than 13 (13-03-91 or 28-11-91) is succefully login.
2. So I check, How? the date is print. Below code
Code:
if IsDate(rs("DOB")) then
Response.Write(CDate(pwd) & "<br>") --- output is (11/2/90)
Response.Write(rs("DOB") & "<br>") --- output is (2/11/90)
else
Response.Write("Error")
end if
4.Because in my program, I check the ( if rs("DOB")= CDate(pwd) then)
Pls check the below coding... and reply me immediately is very very urgent advances thanks.......
Code:
<%
dim uname
dim pwd, password, varDate
uname = Request.Form("txtUname")
uname = UCASE(uname)
Session.Contents("IDNO") = uname
pwd = Request.Form("txtPwd")
Set rs = Server.CreateObject("ADODB.Recordset")
Set rs.ActiveConnection = my_Conn
rs.Open "SELECT * FROM " & TBL_Data &" where "& TFL_IDNO & " = '" & Session.Contents("IDNO") & "'", my_Conn, 1
if rs.RecordCount = 0 then
rs.Close
my_Conn.Close
set rs=nothing
set my_Conn=nothing
Response.Redirect("verify.asp?Submit=namefailed")
end if
if isdate(pwd) then
if rs("DOB")= CDate(pwd) then
rs.Close
my_Conn.Close
set rs=nothing
set my_Conn=nothing
Response.Redirect("verifyParticulars.asp")
end if
else
alert("Wrong Password Format")
end if
rs.Close
my_Conn.Close
set rs=nothing
set my_Conn=nothing
Response.Redirect("verify.asp?Submit=passfailed")
%>
Comment