I have the following piece of code:
<?php
session_start();
function Login($username, $password)
{
// If user was in the middle of filling out new account form,
// and decided to login, then clear all the junk the user filled out.
if ($_SESSION['signup_account']) {
session_destroy(); // line 11
session_start();
}
}
?>
and I got this error today from the error logs:
PHP Warning: session_destroy() [<a href='function.session-destroy'>function.session-destroy</a>]: Trying to destroy uninitialized session in /home/username/public_html/checklogin.php on line 11
doesn't it count as session_start() when it's outside of the function? or am i missing something else here?