Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8108651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:10:50+00:00 2026-06-06T01:10:50+00:00

I am working on an website where users will have to pay a small

  • 0

I am working on an website where users will have to pay a small fee to create an account, and having an account will give them access to all of the features of the website for a certain amount of time, lets say 6 months.

Right now, I am using php to create user accounts using a mysql database to store user account info, and users can freely login/out for free, for an unlimited amount of time.

My question is, how would I go about setting a time limit on every account created, and once expired, give users the option to re-new their memebership?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:10:51+00:00Added an answer on June 6, 2026 at 1:10 am

    why don’t you simply add an expired column in the user table and compare it with current date before you allow login – if this date has expired just redirect to a payment page to renew the membership?

    You can also use this date to show “remaining days” for the active members and start showing payment link in the last few days or so.

    I have always used DATETIME as column type to store the dates infor.

    Have a look at MySQL date and time functions at http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html For example: The following query selects all rows with a date_col value from within the last 30 days:

    SELECT something FROM tbl_name
        -> WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col;
    

    What you need in your case is the following query to make memberships inactive –

    $sql = SELECT * FROM users WHERE
    DATEDIFF(expiration_date, CURDATE()) days_left
    HAVING days_left < 0 
    
    while($row=.....) {
    //Update query to set user_status='expired' or whatever 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a website in which many users can create their account
I am working on a site that will allow users to create an account.
I'm working on a web-based project that users will access after having been authenticated
I'm working on a website that will be using Facebook Connect to authenticate users.
I am working on a website where Users create their accounts. I need to
I'm working on a website where users can create and save their own HTML
I have a website which offers (FREE) account based services. Iam working on a
I am working on a website where users have core data about their profile
I'm working on a company website that allows users to have their own homepage
I have a form that the users for my website will fill out. Once

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.