Hello.. I want to saving sessions in MySQL database? How to use it? thank you
First start a session with session_start() then assign a $SESSION variable using $SESSION['variable'] = $variable
Just add to Houdini's comment that session_start() should ideally be the first thing in your page, otherwise you will get the infamous "headers already sent" message
web.designer.iq wrote:Hello.. I want to saving sessions in MySQL database? How to use it? thank you
I expect that you were asking how to store a session in a database as opposed to how to actually use sessions.
The cleanest way is to use the session save handler function.
http://us3.php.net/manual/en/function.session-set-save-handler.php
Read the comments. There are a few gotchas.