-5

Can anyone help with this? i need to get this working ASAP

Warning: Cannot modify header information - headers already sent by (output started at /home/XXXXXXXXXXXX/public_html/advert5.html:445) in /home/XXXXXXXXX/public_html/advert5.html on line 692

 header ('Refresh: 2; url=dashboard.html'); 
    echo"</center>";
    }
    setcookie("user",$myid,time()+10000);
    mysql_close($con);
Sebastian Paaske Tørholm
  • 49,493
  • 11
  • 100
  • 118
  • See http://stackoverflow.com/questions/8028957/headers-already-sent-by-php for the ultimate answer on why you get "headers already sent" – Honk der Hase Jun 04 '13 at 11:00

1 Answers1

2

Cookies are actually set on the browser. Since you have used header function before settings cookie you get this error / warning message

Lepanto
  • 1,413
  • 1
  • 8
  • 15
  • i have cookies enabled on my browser? –  Jun 05 '13 at 08:21
  • Did you check the following page, this has brief explaination of why you should not use header, cookie related function after you print / echo / output anything on your script http://stackoverflow.com/questions/8028957/headers-already-sent-by-php – Lepanto Jun 05 '13 at 08:42