When using setcookie() i get the error:
Warning: Cannot add header information - headers already sent by (output started at d:\apache\htdocs/index.php:1) in d:\apache\htdocs/index.php on line 7
anyone know what the problem might be? or a solution?
The solution is in the error message.
The header must be the first output of the script. Note: it does not have to be the first command in the script, just the first output.