I have one new issue I just noticed. On my main page, the page where I do most of the html code (Basically a template page), I have
Now in my php file where I handle the log in, I have a form which gets echoed out. This calls up the Validate.js onsubmit.
In the same page, I also have another function which process the form, so gets the values out, compares them to values in the database etc. One of the jobs here is to see whether an option had been made on the form, and if it has, set some cookies.
setcookie("cookname", $_SESSION['username'], time()+60*60*24*100, "/");
setcookie("cookpass", $_SESSION['password'], time()+60*60*24*100, "/");
I now get the common error
Warning: Cannot modify header information - headers already sent by
Its complaining that the script type code has already sent the header. However, I need to have this in the head of my main document as this is where it goes. Now if I do this, how can I then set the cookies? Is there anyway around this?
Just to give you an idea, this is how i call everything up
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/RegStyles.css" rel="stylesheet" type="text/css" />
So the outcome of all processes I make goes into the centerBar div.