Click to See Complete Forum and Search --> : age verifcation


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
%>

don
04-26-2003, 11:18 PM
I will work on your solution ,
I relize it is no deterent it is more of a PR excerise to be seen as trying to control who views the page :)

May need to post follow up on this as iam new to asp and big learning curve

regards
Don