At 01:25 02.03.2001, Tobias Talltorp said:
--------------------[snip]--------------------
><?php
>session_start();
>session_register("value");
>session_unregister("value");
>session_destroy();
>?>
--------------------[snip]-------------------- 

Why would you want to create and destroy the session data during a single
request? That simply doesn't make sense - session persistence is designed
to keep registered session data available across _a_series_ requests.

I believe PHP chokes at session_destroy() since the session save file has
not yet been created, and thus deleting the session data returns an error code.

Try this - it should work:

<?php
if ($isset($value)) {
    echo "thanks";
    session_destroy();
}
else {
    $value = 12;
    echo "<form><input type=hidden name=value value=$value>";
    echo "input type=submit></form>";
    session_start();
    session_register($value);
}
?>


     ...ebird

   >O     Ernest E. Vogelsinger
   (\)    http://www.1-at-web.at/
    ^     ICQ#   13394035


-- 
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