Re: Help need to create a PHP members area
All you need (he said, as if it were nothing) is an indication in your database (either in the user record, or in a table you can join to the users table) of whether the user is paid up or not, and to what date. You would use that value to determine whether or not to set a user session variable to "valid" (along with the username and password checking, of course). Every page in your members area should have a "session_valid?" check at the top that redirects the user either to the login page (if the username/password check fails) or to a "not paid" page if the username/passord check passes, but the subscription has expired (allow a few days' grace as a courtesy).
Maintaining the subscription data, on the other hand, depends on the method of payment. Payment processors (like PayPal) usually have an API that either messages your server on payment (either by POST request or by mail -- prefer POST if you get a choice) or that your server can query for account updates. If you are maintaining the list manually, you'll need to either create a form/page/script to maintain the payment table (or, if you're masochistic, you can use phpMyAdmin to work on the table directly). If you are using a payment processor, see their developers site for information about the APIs and requirements.
“Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
"It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)