Jump to content

Cookies problemo

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Guest_Jaan_*

Guest_Jaan_*
  • Guests
Anyway i got this problemo.. i got this 2 things:

setcookie("username", $user, time()+18000);

setcookie("password", $password, time()+18000);

and they are in the middle of my script.. and i get this facking error..


Quote

Warning: Cannot modify header information - headers already sent by (output started at /home/j*/public_html/*/index.php:32) in /home/*/public_html/*/index.php on line 171

Warning: Cannot modify header information - headers already sent by (output started at /home/*/public_html/*/index.php:32) in /home*/public_html/*/index.php on line 172

So where's the problem hmm.. :S

#2
TkTech

TkTech

    The Crazy One

  • Moderators
  • 1,396 posts
er....if you've tried to do any output at all, you send the default headers and anything you've cached by calling setcookies or header(). If you try to use any of those functions after output, your out of luck.

#3
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
Also white spaces before and after your php tags at the head and bottom of your page has also caused this error.