I am beginning to learn how to authenticate via MySQL and every time I try to use session_start(), then following stuff appears:
Code:Warning: Cannot send session cookie - headers already sent by (output started at /home/httpd/ html/testdir/verify.php:7) in /home/httpd/html/testdir/verify.php on line 31 Warning: Cannot send session cache limiter - headers already sent (output started at /home/httpd/ html/testdir/verify.php:7) in /home/httpd/html/testdir/verify.php on line 31 Thanks! You're now logged in as kalataw
Also, here's my code that i'm using when the actual login verification is done:
PHP Code:else{
$PHP_AUTH_USER = $username;
$PHP_AUTH_PW = $password;
session_start();
session_register("PHP_AUTH_USER");
session_register("PHP_AUTH_PW");
echo "Thanks!<BR>\n";
echo "You're now logged in as ". $_SESSION['PHP_AUTH_USER']. "<BR>\n";
echo "<A HREF=logout.php>Click here</A> to logout.";
session_destroy();
}
}
What am I to do???
-Wes


Reply With Quote
Bookmarks