hi
i want to use setcookie() function like below code:
PHP Code:
setcookie('CookieName','ShaMSofT',time()+60*60);
but i see this error:
Warning: Cannot modify header information - headers already sent by (output started at J:\wamp\www\Project\Hotel CMS\Copy of Ex.php:1) in J:\wamp\www\Project\Hotel CMS\Copy of Ex.php on line 13
you're probably echo:ing something before trying to modify the header information...
If you post your entire file I could have a look...
Never argue with fools, they will only drag you down to their level, and beat you with experience.
Q: How do you tell an experienced hacker from a novice?
A: The latter thinks there's 1000 bytes in a kilobyte, while the former is sure there's 1024 meters in a kilometer
You need to move your setcookie() lines. They have to be first in the file. (They have to be before any output, like html code)
Never argue with fools, they will only drag you down to their level, and beat you with experience.
Q: How do you tell an experienced hacker from a novice?
A: The latter thinks there's 1000 bytes in a kilobyte, while the former is sure there's 1024 meters in a kilometer