Jump to content

Hello all, new to this need some guidance


cripin

Recommended Posts

I want to create an advertising website basically a game top list and want to add premium accounts this is how it would work:

 

1.login or register at (registration.php)

 

2. go to (premium.php) - to access it user needs to be logged in if not show the login screen.

- display information about premium 

- have a column of available premium type accounts allowing users to tick the chosen one

- user selects the type of premium account and clicks buy

- user selects payment type paypal or bank

- user pays 

******************************************************

now what should happen to users account once the payment is complete? How to turn the account into premium, add a separate field to regular users table or create a new table for premium accounts.

 

Thanks a lot
Link to comment
Share on other sites

What you could do instead of adding a new column or a new table is have a column called "account type" or "account" for short. Make the data for each user either a 1 or a 2. If a user is a 1 they are a regular user, if a user is a 2 they are a premium user. That way you can just update their information when they become premium.

Link to comment
Share on other sites

If you follow that suggestion, make sure to have a solid system to check when a users premium ends. If you dont check that, they will remain premium for ever.

 

Considering you will probably be storing premium subscriptions in a database, you can use that table to see if the user is still a premium member or not. The first option is easier, but the second is more accurate. Whatever you so desire ;)

Link to comment
Share on other sites

How about another column for profile creation date or last payment date? Then when a user logs in you can write a script that checks if they are premium, if they are premium then it checks the data column to see if it has been 30 days or how ever long you want it to be.

 

Make sense?

Link to comment
Share on other sites

Considering you will probably be storing premium subscriptions in a database, you can use that table to see if the user is still a premium member or not.

 

+1

 

for any kind of subscription tracking, you would treat it as a deposit account, where you insert a record for each addition to a person's subscription, with at least a duration of the amount of time that was added. this will allow for things such as a person extending their existing subscription by paying for/adding any available increment of time or giving someone a free amount of time due to a problem... just add a record for any user_id.  to find out if their subscription is current, just sum up all the durations from the initial (lowest) start date and compare it to the current date.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.