I am using sessions to pass info from one page to another.
to end a session, i thought that i'd create a 'log out' link, that would end the session by using <?php session_destroy(); ?>
when i click on the logout button, i get the following error:
Warning: session_destroy(): Trying to destroy uninitialized session in /var/www/html/phpdirectory/logout.php on line 1
each one of my pages has <?php session_start(); ?> at the top, except for the logout page. while i was gettign the error
i added <?php session_start(); ?> to
the top of the logout page, and didn't get the error... did this fix the problem and 'clear the cookies' for the sessionn?
what am i doing wrong?