janice
02-05-2005, 10:57 PM
imonth = Request.Form("expMonth")
iyear = Request.Form("expYear")
if iyear < <%= Year(Date()) %> Then
Response.Redirect "checkout.asp?msg=" & Server.URLEncode ("<font color=red>The credit card has expired.</font>")
end if
if iyear = <%= Year(Date()) %> AND imonth < <%= Month(Date()) %> Then
Response.Redirect "checkout.asp?msg=" & Server.URLEncode ("<font color=red>The credit card has expired.</font>")
end if
Per above code, I am just trying to validate a credit card by ensuring that it isn't an expired card.
If the month entered by customer is less than current month, then card has expired.
if the year entered by customer is less than current year, the card has expired.
Can anyone please help me understand why this isn't working?
Thanks a lot.
Below is the error I keep getting:
Syntax error
/MillenniumHealthProducts/process.asp, line 255, column 11
if iyear < <%= Year(Date())
----------^
iyear = Request.Form("expYear")
if iyear < <%= Year(Date()) %> Then
Response.Redirect "checkout.asp?msg=" & Server.URLEncode ("<font color=red>The credit card has expired.</font>")
end if
if iyear = <%= Year(Date()) %> AND imonth < <%= Month(Date()) %> Then
Response.Redirect "checkout.asp?msg=" & Server.URLEncode ("<font color=red>The credit card has expired.</font>")
end if
Per above code, I am just trying to validate a credit card by ensuring that it isn't an expired card.
If the month entered by customer is less than current month, then card has expired.
if the year entered by customer is less than current year, the card has expired.
Can anyone please help me understand why this isn't working?
Thanks a lot.
Below is the error I keep getting:
Syntax error
/MillenniumHealthProducts/process.asp, line 255, column 11
if iyear < <%= Year(Date())
----------^