Helping ordinary people create extraordinary websites!
   

How can I display different content for different users with PHP?

Tuesday, 15th September 2009
by Mukash


Just like the way an email account works you need to have a password and a user name in order to access different content. How can I set this up on my website with PHP?






bbrainz
Hello there,

For that you will basically create a database, with username/pass storage for each user. For each user you take the username and insert into database whatever content you want to store, this content will be store with username being primary key.

On frontend you will have to provide user login box, once the user logs in successfully you will store user's username in session. Using that session information you will execute the queries against your database to get particular user content.

Thanks.
Tuesday, 15th September 2009
Votes:
68
40

More PHP Help:
» How to configure php on my system?
» What is the source code needed to integrate PayPal in with PHP and MySQL?
» Needed: PHP script to simulate a users web session kind of like a recorder/player
» How to upload file in PHP?
» How to turn URLs into links using PHP?
» How do I remove the last character of a string with PHP?
» PHP wait, how to make PHP wait or pause timer?
» How to pull and store data with PHP/cURL?