Andy@

Mar / 03 / 2009

Flash and PHP Sessions

Watch out for using sessions in PHP and flash. You need to make sure they stay in sync; so when you have created a session in PHP (usingĀ session_start() ), you need to get the session id ( session_id() ) and pass it back to the flash. Then, in your flash communications, pass the session_id back to the PHP, and set it in the PHP like this (before you run session_start() ):-

if (isset($_REQUEST["session_id"])) {
	session_id($_REQUEST["session_id"]);
}
Page 1 of 1