|  | Posted by Sanders Kaufman on 08/26/07 21:23 
Matt wrote:> Hey everyone,
 >
 > This is a pretty silly one, I just can't get my head around it.
 >
 > I have a table of artices, with a row "isPremium", meaning it's
 > content available only to paid users. In my corresponding user table I
 > have a row "user_group" with various levels signifying access rights.
 >
 > In my file displayarticle.php I'm trying to process this. What I want
 > is for the system to check the article ID, if it's premium, check the
 > user's credentials (and if they're not okay, print some kind of
 > error), and if it's not premium, just display it as normal.
 
 What - are we working on the same project? ;)
 
 The way I did this is to have the article displayed in TWO PHP pages,
 loaded into the main page.
 
 The first page displays the teaser - title and description - to everyone.
 
 The second page checks the credentials before displaying the content.
 [Back to original message] |