I am writing PHP code where I want to pass the session id myself using POST. I don\'t want a cookie to store the session, as it should get lost when the user gets out of the
The way to do it is to setup sessions yourself.
In the central include file that all your other files are including (you do have one of those, right?), you need to do a few things as early as is practical.
if( !array_key_exists('sessionid', $_POST) ) {
// recreate the sessionid
$sessionid = md5(rand().' '.microtime()); // Or something
} else {
$sessionid = $_POST['sessionid'];
session_id($sessionid);
session_start();
Now you have to remember that as soon as you start the form, you need to include:
= session_id() ?>