don
04-26-2003, 03:45 PM
Hi
Iam using asp to verife age of 18 or over on this form
http://www.jervisbaytourism.com/hp/ works fine for year would like it to work too the day
Eg here in oz it is 27/04/2003 so verifided date would be any date before 27/04/1985 so if i put in 28/04/1085 it should reject it but doesnt
Could some one please look at our verifiy1.asp
any advice would be much appreciated
Don
this is verifiy1.asp
<%
rday=request.form("day")
rmonth=request.form("month")
ryear=request.form("year")
rx=request.form("agreecheck")
if rday<32 and rmonth<13 then
xday=dateserial(ryear,rmonth,rday)
yday=date()
age=datediff("yyyy",xday,yday)
response.write xday & " / "& yday&"<br>"
response.write rx& " / "& age
if age>17 and rx=1 then
Response.Redirect("links.asp")
response.write "<br>go to http://www.Jervisbaytourism.com./links.asp"
session("accept")=true
else
Response.Redirect("http://www.crayola.com")
response.write "<br>go to http://www.crayola.com"
session("accept")=false
end if
else
response.write "No correct date.."
end if
%>
Iam using asp to verife age of 18 or over on this form
http://www.jervisbaytourism.com/hp/ works fine for year would like it to work too the day
Eg here in oz it is 27/04/2003 so verifided date would be any date before 27/04/1985 so if i put in 28/04/1085 it should reject it but doesnt
Could some one please look at our verifiy1.asp
any advice would be much appreciated
Don
this is verifiy1.asp
<%
rday=request.form("day")
rmonth=request.form("month")
ryear=request.form("year")
rx=request.form("agreecheck")
if rday<32 and rmonth<13 then
xday=dateserial(ryear,rmonth,rday)
yday=date()
age=datediff("yyyy",xday,yday)
response.write xday & " / "& yday&"<br>"
response.write rx& " / "& age
if age>17 and rx=1 then
Response.Redirect("links.asp")
response.write "<br>go to http://www.Jervisbaytourism.com./links.asp"
session("accept")=true
else
Response.Redirect("http://www.crayola.com")
response.write "<br>go to http://www.crayola.com"
session("accept")=false
end if
else
response.write "No correct date.."
end if
%>