<% language=vbscript %> Birthday Countdown Application

The ASP Birthday Countdown Application
(professional Version!)

<% Dim UserDay Dim UserMonth Dim UserYear Dim BirthdayString Dim NextBirthday Dim UserAge If (Request.Form("BirthdayMonth")="")and(Request.Form("BirthdayDay")="")and(Request.Form("BirthdayYear")="")then %>

Use it to find out how long you have to wait until your next birthday.

Please enter the month of your birthday
Please enter the day of your birthday
Please enter the year of your birthday

<% else UserMonth = Request.Form("BirthdayMonth") UserDay = Request.Form("BirthdayDay") UserYear=Request.Form("BirthdayYear") BirthdayString = DateValue (UserMonth & "/" & UserDay & "/" & UserYear) Response.Write ("

The Birthdate you entered is : "& BirthDayString & "

") UserAge = (DateDiff ("yyyy", BirthdayStirng, Now)) If CInt(UserMonth) < (Month(date)) Then UserAge = UserAge + 1 End If NextBirthdayDate = DateSerial (UserYear+UserAge, UserMonth, UserDay) response.Write ("

Your next Birthday is on : " &_ NextBirthdayDate & "

") Response.Write ("

You have to wait ") Response.Write (Datediff( "d", Now, NextBirthdayDate)) Response.Write (" days until your birthday !

") End If %>