PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am now trying to use sessions across multiple pages and then kill? unset? or destroy? the session... I just get rid of the SID at the last page so when we go back to the first page it will create a new SID. Just like closing the browser and reopening.
For some reason it just ain't happening.
Below isn't my code but the methods I am using for the sessions.
<?php
session_start(); // using this to start my session on each page - at the top before any browser output
$some_var = $_SESSION['some_var']; // setting session variables like this
session_unset(); // get rid of all the sessions values
$_SESSION = array();
session_destroy(); // destroy session - won't that get rid of the SID???
?>
you "delete" the session on page a, and it still shows in page b? or is this all in page a? (page a being page request one, page b being page request two)
Page A starts a session and adds a session value
Page B starts a session (same one i guess) and asks for another value from the user.. then on the same page after the user presses bumit the same page is evaluated again (yes it does start a session and then does a query depending on the value the user selected. After that it does the destorying part.
Then if i go back to A the SID is the same. refreshing page of course