ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 9th, 2002, 12:40 PM
lckidwell lckidwell is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 7 lckidwell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Fun with CC exp dates

hey there - found a problem with my expiration validation thing that effects .000001 percent of users - but hey, they gotta buy stuff too... here's my code:

' validates expiration

if DateDiff("d", Month(Now)&"/"&Year(now), request.form("expMonth")&"/20"&request.form("expYear"))<=0 then

response.redirect "PaymentForm.asp?message="&Server.UrlEncode("Your Credit Card is expired. Please check your expiration date and try again.")

end if

as you can see... the problem is that if someone's credit card expires THIS month, the system thinks it's expired.

So how do I tell it to check if the expiry is a month BEFORE this then fault it, if it's this month... let it pass. Thanks!

Reply With Quote
  #2  
Old December 9th, 2002, 06:03 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 8 m 57 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Just minus one off the Month function result.

(Month(Now) - 1)

I think. Try it out and let me know.

Reply With Quote
  #3  
Old December 10th, 2002, 01:38 PM
lckidwell lckidwell is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 7 lckidwell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
there we go!

I had been putting that "-1" just about everywhere but the right place...

thanks!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Fun with CC exp dates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway