Reply to Re: Is It Possible To Force Closing A Session ID Without Closing The Browser?

Your name:

Reply:


Posted by cibalo on 04/08/07 10:56

On Apr 8, 2:58 pm, "J.O. Aho" <u...@example.net> wrote:
> cib...@gmx.co.uk wrote:
> > Hello,
> > I use the session id as the shopping cart id in mysql database. I am
> > just wondering if it is possible to close the current session id and
> > force a new session id after the shopping cart check-outed.
>
> Page1: kill the session
> use header() and redirect to page2
>
> Page2: create new session
>
> --
>
> //Aho

Hello J.O. Aho!


Many thanks to you for replying to my post. Let's try your suggestion
into coding as follows:
test-a.php:
<?php
session_start();
$sid=session_id();
setcookie('sid', $sid, time()+60*60*24*7);
header('Location: test-b.php');

exit;

?>

test-b.php:
<?php
session_start();
$sid2=session_id();
$sid1=$_COOKIE['sid'];
echo "<h1>Session #1 = $sid1</h1><h1>Session #2 = $sid2</h1>";

exit;

?>

Running test-a.php will redirect to test-b.php, the two session id's
echoed are the same session id. Your suggestion doesn't work! Please
correct my coding if I misinterpret your suggestion.

Any Suggestions Are Welcome!!!

Thank you very much for your assistance.

Best Regards,

cibalo

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация