<?php
$con = mysql_connect("localhost", "", "") or die(mysql_error());
$db = mysql_select_db("pinehead", $con) or die(mysql_error());
$sql = "SELECT * FROM users where uname='$uname' and pass='$pass'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
if ($row["uname"] == $uname && $row["pass"] ==
$pass) {
setcookie ("user", $uname, time()+604800);
echo "logged in";
} else {
echo "NOt logged in";
}
?>
I could i have it if the user is logged in to locate the person to the next page but, not get a headers error cuase of the cookies?
THank you
Anthony