I've got this errorWarning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/siambidd/domains/siambidding.com/public_html/session.php:3) in /home/siambidd/domains/siambidding.com/public_html/session.php on line 4
I've checked my code, there is no any spaces,
and I'm not using BOM as well, but still got this error.
please help me
here is my code
<html>
<head>
<?php
session_start();
ob_start();
include('connection.php');
$username = $_POST['username'];
$password = $_POST['password'];
$remember = $_POST['remember'];
$sql = ("SELECT * FROM users WHERE username='$username'");
$result = mysql_query($sql);
if ($result)
{
$rows = mysql_fetch_array($result);
$passwordx = $rows['password'];
if ($password == $passwordx)
{
$_SESSION[ses_id] = session_id();
$_SESSION[ses_username] = $username;
echo "<meta http-equiv='refresh' content='0;url=session.php'>";
}
else
{
echo "รหัสผ่านไม่ถูกต้อง";
}
}
else
{
echo "ไม่พบ username นี้ใระบบ";
}
?>
</head>
<body>
</body>
</html>