wk4997
05-19-2004, 12:40 AM
I am beginning to learn how to authenticate via MySQL and every time I try to use session_start(), then following stuff appears:
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:
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
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:
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