I keep on getting the following message whenever I try to create a cookie All I want to do is to create a cookie sucessfully whenever a user login into my test site (www.booo.vndv.com). Here's the code <?php function jack_in(){ $user= $_POST['name']; setcookie('user',$user); print $_COOKIE['user']; } ?> <?php require "header.php"; ?> <body> <?php function login_form($errors=''){ if($errors){ print 'Correct the following errors...'; print '<li><ul>'; print implode('</li><li>',$errors); print '</li></ul>'; } print<<<_HTML_ <form method="POST" action="$_SERVER[PHP_SELF]"> Your Name: <input type="text" name="name"> <br> Your Password: <input type="password" name="password"> <br> Done!: <input type="submit" value="done"> <input type="hidden" name="_submit_check" value="1"> </form> _HTML_; } function retrieve(){ $errors= array(); mysql_connect("localhost", "admin", "password"); mysql_select_db("booo_db"); $user_name = $_POST['name']; $password =$_POST['password']; $query = "SELECT user_password FROM users WHERE user_name='{$user_name}'"; $result=mysql_query($query); $row=mysql_fetch_assoc($result); if(!$password==$row['user_password']){ $errors[]='Wrong User Name or Password'; } return $errors; } if($_POST['_submit_check']){ if($form_errors=retrieve()){ login_form($form_errors); }else{ jack_in(); } }else{ login_form(); } ?> <?php require "footer.php"; ?> PHP: