Categories
josephscott

Store Session Data In A MySQL Database

Chris Shiflett points to two examples of storing PHP session data in MySQL. The first example is from Chris’s Guru Speak articles and the second example is from Chris’s book Essential PHP Security. Both of these examples are very basic, but provide enough to get you going. It should go without saying that you aren’t limited to MySQL for this, there is no reason why you couldn’t use PostgreSQL, Oracle or Microsoft SQL Server.

For more details check out the PHP documentation on Session Handling Functions.