I'm totally new to php (just started learning recently) and I'm facing an issue with cookies
here's the error/warning I'm getting:
Warning: Cannot modify header information - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/cookies.php:5) in /Applications/XAMPP/xamppfiles/htdocs/cookies.php on line 5
all what I've written inside the file is this:
<body>
<?php
setcookie('test', 45, time()+(60*60*24*7));
?>
</body>
** I'm using XAMP on Mac
Any idea why this is happening and how can I fix/deal with it ?
thanks,