cripin Posted May 2, 2013 Share Posted May 2, 2013 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 Quote Link to comment Share on other sites More sharing options...
computermax2328 Posted May 2, 2013 Share Posted May 2, 2013 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. Quote Link to comment Share on other sites More sharing options...
DaveyK Posted May 2, 2013 Share Posted May 2, 2013 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 Quote Link to comment Share on other sites More sharing options...
computermax2328 Posted May 2, 2013 Share Posted May 2, 2013 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? Quote Link to comment Share on other sites More sharing options...
cripin Posted May 2, 2013 Author Share Posted May 2, 2013 yeah thanks a lot, will try it now, will get back if I get stuck, thanks again Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted May 2, 2013 Share Posted May 2, 2013 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.