Jump to content

Session tutorials with mysql database.


jobs1109

Recommended Posts

The "session" is a small array that stores variables relevant to the user's current session (the time they've spent browsing your site in the last hour or so).  Sometimes the session data can be stored in the database if you have a good reason for it, but otherwise just leave session handling alone.

 

Now, once you have a session of some sort, you will then have a login system which uses that session.  The current user's ID and/or username would then be a part of the session.  When you perform database queries, make sure to always include the user's ID (and make sure your tables are designed so they all link to a specific user where appropriate). 

 

In this way, you can limit all queries to only affecting the items for the currently logged in user.

 

-Dan

Well, make a page that selects the postings linked to the currently logged in user.

 

Then make a page that can edit a single posting.

 

On the portion of the code that saves the edits to a posting, make sure the posting being edited belongs to the currently logged in user.

 

-Dan

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.