Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent
CODE:
require_once("connect.php"); // Connect to database
session_start(); //<-- PROBLEM DON'T KNOW WHAT!!
// POST options:
$username = $_POST['user'];
$password = $_POST['password'];
$submitted= $_POST['submitted'];
// Make action with query:
if ($user && $password){
$query = sprintf("SELECT * FROM login WHERE user = '$username' and password = '$password'");
$result = mysql_query($query);
$account = mysql_fetch_array($result);
}
if ($account){
$_SESSION['id'] = $account['id'];
header("location:news_updater.php");
exit;
} elseif($submitted){
echo "Sorry, there is no such user";
?>
===============================
2007-06-24
08:54:05
·
3 answers
·
asked by
truepal20032001
2
in
Computers & Internet
➔ Programming & Design
I am running localhost, is it limited or something, when i take session_start(), everything seems to work right except its dependencies...
please help!
2007-06-24
08:55:16 ·
update #1
thankyou drew010, but i still get another error, when i submit the form:
Warning: Cannot modify header information - headers already sent by login.php in line 36:
===============================
"header("location:news_updater.php");"
===============================
what might be the solution for this problem?..
2007-06-24
09:05:33 ·
update #2