Hi is setting cookie sending output? I get this error: Warning: Cannot modify header information - headers already sent by (output started at /home/pw64/public_html/sitesaz/regt.php:8) in /home/pw64/public_html/members/saleconfirmed.php on line 37 line 37 is : 36 $past = time() - 3600; 37 setcookie('refferer', $userid, $past); Code (markup): and i cannot chage this line or line 8. is there a solution?
No, php is telling you that something has been sent to browser on line 8 of regt.php. And setting cookie is made through sending a header like this: Set-Cookie: SS=Q0=aW5mbzpodHRwOi8vd3d3Lmdvb2dsZS5ydS8; path=/search Code (markup): So you get this error - script can not set cookie.
There is an easy fix. If you add this to the very top of the page (no space or line break above it) it should be ok <?php ob_start(); ?> PHP: