Jump to content

Help needed for Article management system


prateekbtbl

Recommended Posts

Hi Friends,

 

I am new in PHP/MySQL, i am developing article managemenst system for my assignment. Where in the members of the site after registering under different packages will allow to view articles. For eg we have packages like 25 artilces, 50 articles, 100 articles etc. Now if a member have subscribe for 25 articles after viewing the 25th article he will not be allow to view anymore and his a/c will be disabled. After renewal of his a/c he will be allowed to access more artilcle. Now my question is that how can i keep track of the articles viewed by the member in database and the query needed to pass in the database which will match his to no. of subscription and his current viewing so that after the member cross the limit his a/c will get disabled.

 

Please help me

 

Regards

Prateek

no not yet

 

yea i want to keep track of the article they viewed and if somebody has selected 25 article pack they can view only 25 articles from the list of articles which may be around 100 or more. once they click the 25th article they won't be able to view any new and they will be asked to renew their package.

Well in your database for the users you could have a column titled 'views' or similar which you can record how many articles they've viewed. Just a simple increment each time they view an article.

Then you need to check that number against their subscription. If it's a 25 subscription and views equal 25 then dissallow them to view any articles. When they re-subscribe then reset the 'views' number to 0.

 

noting which articles they've viewed would be a little bit trickier, but not much. just another table in the database which stores the article id's seperated by something.. prehaps #. Then this can be read from the database and then exploded to give all the indiovidual numbers.

Might be a better way of doing it, but that's what I'd do off the top of my head.

Try looking up databases and simple php functions on google, or even better php.net

ok it seems great Dragen, one part is solved, but what about the 25 articles the user have subscribed. After view 25 articles the a/c will get disabled so the user won't be allowed to view any new articles but i think during this period until he renew his a/c he should be allowed to view the 25 articles which for which he has already paid.

well Don't disable everything. Not have a function on the article page which checks if the user is allowed to view any articles and if not, then checks if the article is one they've already viewed (stored in the database).

If they've already viewed the article then display it, else bring up an error.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.