Problem with cookies

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


  I'm doing a login page in PHP and i'm with some problems with

  In a login.php, a cookie is set:
  setcookie("loggeduser","$username", time() + 900, "/");
  header("Location: index.php");

  In index.php the cokkie is tested and reloaded.

  if (isset($_COOKIE['loggeduser'])){
    $user = $_COOKIE['loggeduser'];                              
setcookie("loggeduser","$user", time() + 900, "/");
  This procedure is performed each time a web page is loaded.

  The problem is that when i run the application in enviroment test
(local server) it works fine but when the site is loaded from a real
web server the cookie isn't set.

Somebody can help me!


Site Timeline