Helping ordinary people create extraordinary websites!

Saving PHP Session Data to a Database

By Tony Marston
2005-07-11

Conclusion

As you should be able to see it is a relatively straightforward process to switch the recording of session data from ordinary disk files to a database table. This overcomes the drawbacks inherent with ordinary disk files:

  1. The session data is more secure as a potential hacker must be able to log into the database before he can access anything.
  2. The use of multiple servers would not create a problem as all session data now resides in a single central place and is accessible by all servers.
  3. It is much easier to query the database should the site administrator require information about current sessions or current users.




Tutorial pages:
 1 Votes

You might also want to check these out:


Leave a Comment on "Saving PHP Session Data to a Database"
You must be logged in to post a comment.

Link to This Tutorial Page!


GET OUR NEWSLETTERS