Re: session id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 25, 2008 at 5:51 PM, Łukasz Wojciechowski<nostrzak@xxxxxxxxx> wrote:> Hi, I'm using SWFUpload JavaScript for my upload in my logged part of>  website. I'm passing session_id in every post request from flash>  object. In my script I set forwarded id with>  session_id($_POST['passed_id']) but I got logout on that request (it's>  redirecting me to login page) and I'm also logged out in my browser>  (not flash). Then I need to relog. Everything is working fine when I'm>  not touching session_id() id setting. Any clues?
    Try this instead:
<?session_start();$_SESSION['passed_id'] = $_POST['passed_id']; // Sets the server-sidesession variable$_COOKIE['PHPSESSID'] = $_POST['passed_id']; // Names the sessionwhatever data was POST'ed?>
    As always, BE SURE TO SANITIZE YOUR CODE!
-- </Dan>
Daniel P. BrownSenior Unix Geek<? while(1) { $me = $mind--; sleep(86400); } ?>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux