On Wed, Apr 2, 2008 at 10:34 AM, pere roca <[EMAIL PROTECTED]> wrote:
>
>   <?php
>     session_start();
>     $_SESSION = array();
>     session_destroy();
>
>     $userid     = safehtml($_POST['userid']);
>     session_start();
>
>    //$sessionid can be used to retrieve the current name and session id as a
>  string
>     $sessionid=session_id();
>    //userid can be re-used as a variable in other php files
>    session_register("userid");
>
>     After leaving the page and coming back, without closing the browser, and
>  performing a SQL sentence like "insert into user_table values
>  ('$userid','$sessionid')";  I get sessionid is still the same!! why¿?

    This is expected behavior.  Calling session_destroy() only removes
the data associated with the session.  To kill the PHPSESSID value,
RTFM: http://php.net/manual/en/function.session-destroy.php

-- 
</Daniel P. Brown>
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Just ask!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to