SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Jan 2005
    Location
    england
    Posts
    329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how would i do a trial period script

    Hi i was wondering if anyone can point me in the right direction.
    i have a script where members can upload videos,photos,flash etc. how would i do it so i can give them a 15 day trial, so if they still want to use the video and photos they would have to upgrade after the 15 days.
    using php and mysql

  2. #2
    SitePoint Addict
    Join Date
    Aug 2004
    Location
    California
    Posts
    267
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm assuming you've already got a member table in your MySQL database. You'll need two fields: One to tell whether the user has upgraded or not, and the other will hold a timestamp.

    Set the timestamp to 15 days from now (or the time they registered), and every time the user tries to log in/perform an action, check it with the current timestamp. If they're past it, then send them to an upgrade-your-account page.
    The Banana Stand - an Arrested Development fansite
    LC-3 Help - tutorials on the LC-3 educational assembly language

  3. #3
    SitePoint Addict
    Join Date
    Jan 2005
    Location
    england
    Posts
    329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi THANKS
    i thought it was the timestamp but was not sure
    thanks paul

  4. #4
    SitePoint Addict
    Join Date
    Jan 2005
    Location
    england
    Posts
    329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi
    if i set a field called register in my database and set that to timestamp
    and a field called trial wich is set to 1 when they sign up
    what query would i write so when the trial period is up it will stop acsess for that user
    is it something to to with time stamp and current date.
    please help not sure how to do this
    thanks paul


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •