Hi all,
I was wondering if you could help me. I have searched the forum already to find advice on cookies and headers but nothin of concrete value.
i get the following errors:
Warning: Cannot add header information - headers already sent by (output started at c:\apache\apache\htdocs\scripts\wrox\ch23\functions.php:44) in c:\apache\apache\htdocs\scripts\wrox\ch23\functions.php on line 49
Warning: Cannot add header information - headers already sent by (output started at c:\apache\apache\htdocs\scripts\wrox\ch23\functions.php:44) in c:\apache\apache\htdocs\scripts\wrox\ch23\functions.php on line 50
Warning: Cannot add header information - headers already sent by (output started at c:\apache\apache\htdocs\scripts\wrox\ch23\functions.php:44) in c:\apache\apache\htdocs\scripts\wrox\ch23\functions.php on line 51
All for the following code:
function deleteCookies()
{
// delete all the old cookies
for($i=0; $i<$total_items; $i++)
{
setcookie("items_tray[$i]","");
setcookie("quantity[$i]","");
}
setcookie("items_tray","");
setcookie("total_items","");
setcookie("quantity","");
}
Now i understand that the stuff about removing all blank spaces which i have done.
Any one have ideas please, it driving me mad... mad i tell you... mad.
I also get about 4 notice errors telling me about undefined variable, can i ignore these.. dont forget that they are all pointing to the file functions.php... yes you guessed it a php file holding functions.
Please Help
Many Thanks
Sunit