<?php
 session_start();
// destroy the session
 session_destroy();
 $p = session_get_cookie_params();
// destory the cookie
 setcookie(session_name(), '' , 0, $p['path'], $p['domain']);

// redirect without the SID for trans-sid users
 header("Location: http://$SERVER_NAME";);
?>

works for me. yes its stupid, but a session has to be started beore it can
be destroyed.

--

  Chris Lee
  [EMAIL PROTECTED]




"Olivier Masudi" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> In my online store i use session.
>
> I use a script to check that a user dont make 2 order during the same
> session using the back button for that i put his sessionid in the db and
> check it before processing the order.
>
> My probleme is how can i give a new session_id to the person when he goes
> back to the home page of my site so he can do a new order ?
>
> I try session_destroy , session_unset
> but the person have still the same session_id
>
> REMARK
>
> I always use the same string into session_name("abcdef") for all the user.
> Is it a problem?
>
>
> Thanks for your help
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to