Sessions and uploadify Sessions and uploadify jquery jquery

Sessions and uploadify


you cannot solve this because uploadify has own session ID which is created by flash player. In other words the flash player access the uploadify script as a new user and gets a new session. The only way you can solve this is to pass current page session_id through post to the uploadify script.


Usually the session ID won't be read from POST.You could do this:

$_COOKIE['PHPSESSID'] = $_POST['PHPSESSID'];session_start();


I found a solution which is far easier to implement, especially if you already have a session-oriented PHP backend for login, etc.:

just write the following code in the jQuery statement:

'script'    : '/upload.php?<?= session_name(); ?>=<?= session_id(); ?>',

which will magically attach your current session name and your session id.