Cookie not setted or not working the first time
问题 On every page I set a cookie to color the header button corresponding to that session. The problem is that the first time I open a page in a different section, the cookie remains the old, and the colored button too. Then if I click another time the same button, the cookie is correctly setted. Why? Here my code: <?php include $_SERVER['PERCORSO_GLOBALS']; $pagelevel = '1'; require_once ROOT_DIR.'/administrator/flock/session_users.php'; setcookie('lng', 'it'); ?> <head> ... </head> <body> <?php