G
G
green_o2015-11-11 11:45:40
PHP
green_o, 2015-11-11 11:45:40

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";

}

?>

I see the following
532a401f0bb5463bae6144ca6edd6c0e.PNG
I read here how to fix it, but everything seems to be normal or I don’t understand something because of the lack of proper experience.
Tell me please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Котик Антон, 2015-11-11
@green_o

Файл должен быть в кодировке UTF-8 без BOM. Перед установкой заголовков не должно быть вывода никаких данных, даже пробелов перед открывающим <? тегом.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question