Subscription expiry date based on current date

Discussion in 'JavaScript' started by phil-re, Oct 7, 2008.

  1. #1
    I am setting up a subscription area for my website. The site allows access for a specific period of time eg 3 days from the sign-up date. I need some javascript that sets the zone expiry to a date 3 days ahead of the sign-up. For example <input type="hidden" value="1-Nov-2008' name="ZoneExpiry" />. Only gives me a specific date in the future and not based on the sign-up date.

    Any help here would be much appreciated.
     
    phil-re, Oct 7, 2008 IP
  2. gzav

    gzav Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I wouldn't recommend doing that, it could easily be exploited. Implement the expiration date in the file that creates the account. You can use the PHP date function: us.php.net/date
     
    gzav, Oct 7, 2008 IP