You are here: Re: Simple Logic Question « PHP Programming Language « IT news, forums, messages
Re: Simple Logic Question

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация