Answer the question
In order to leave comments, you need to log in
I can't change the information in the header, how to cure?
Hello everyone, tell a newbie how to cure the next trouble,
<?
// Скрипт проверки
# Соединямся с БД
mysql_connect("localhost", "root", "");
mysql_select_db("users");
if ( isset($_COOKIE['hash']))
{
$query = mysql_query("SELECT user_roll, user_login, user_hash FROM user WHERE user_hash='".$_COOKIE['hash']."' LIMIT 1");
$userdata = mysql_fetch_assoc($query);
if($userdata['user_hash'] !== $_COOKIE['hash'])
{
setcookie("hash", "", time() - 3600*24*30*12, "/");
}
else
{
header ("Access-Control-Expose-Headers: X-Uid, X-Authentication,"); echo $userdata['user_login'] ;
}
}
else
{
//print "KUKI OFF";
}
?>
Answer the question
In order to leave comments, you need to log in
Файл должен быть в кодировке UTF-8 без BOM. Перед установкой заголовков не должно быть вывода никаких данных, даже пробелов перед открывающим <?
тегом.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question