I'm working on a similar project - I'm also a newbie - here's my approach -
which is fairly simple really.
Create a database of all members that includes columns for "login", "name"
and "paymentStatus" as well as any other info you need for your database.
paymentStatus would be an integer with values of 2 and 5 initially (this
allows room for the creation of other levels in the future) in which 2 is
for paid members and 5 is for free members.
Once members log-in, their paid status is saved as a session variable:
All member-area pages will start with session_start(); at the beginning and
a check of the value of $paymentStatus. If it is null, they are sent to the
log-in page. If the page is for members only, then the value of
$paymentStatus must be <=2. If it is for any member, then $paymentStatus
will have to be <=5 (this all gives room for different levels of membership
in the future, you see).
Likewise content, which is stored on tables, includes a $paid variable which
indicates who is able to view it. This way, you can deliver dynamic content,
links and other information according to the $paymentStatus value of each
visiting member. In my case, I will have index pages with links to content
pages. All links will be visible, but links for paid members will be clearly
indicated. The purpose of this is to show freeloaders what they are missing!
I hope this is clear. More experienced members of this list may well find
flaws with my method.
eBusiness Consultant - ITP Europe
+32 2 721 51 00
> -----Original Message-----
> From: Gavin Amm [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, January 23, 2003 2:03 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Members area
> Hi All,
> I'm about to start development on a members area for a site.
> The members area will have 2 levels - Paid & Free, with the Paid members
> having access to more pages.
> I have not created a members area before & am after any advice or links
> I can get... I think a lot of reading is in order...
> - DB structure & fields (I'll be using MySQL if that's relevant)
> - Sessions (I've seen quite a few threads covering sessions over the
> last couple of months, so should have some links in my 'inbox'
> somewhere... But the more the merrier...)
> - Any PHP suggestions/advice/links
> - Anything else you can think is relevant...
> Thanks, this will be a big help.
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php