Jump to content

GuyFreakz

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

GuyFreakz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. You're right!!! That's the best solution. After i changed the setting of my notepad++, there is no error anymore. Thank you very much. Thank you!!! :D :D
  2. Ho... so it can be like that huh?! I see that's explained why my code always generates error. Thx guyz .
  3. I've checked it many times and there is not even 1 space or tab. I'm not sure but after i followed the link given by corbin, they tell me that the trouble may lays on the text editor. I usually used Notepad++, but i've created the page1.php using TextPad and just for fun i made the second used notepad++. After that i copy the content of page2.php to new document i created in textpad and save it there but in different document. So my deduction is there is error in Notepad++, when it create a new document, just maybe, it's automatically add an invisible character at the beginning of document.
  4. Hi guys, I'm a student who learns php. And now I'm learning about session. I face a problem when i started session with session_start(). First, i declared the "session_start" in page1.php like this <?php session_start(); $_SESSION["username"]="Kay"; ?> And after that i running my opera browser and there is no problem when i entered http://localhost/practice/page1.php. But then i make another page2.php <?php session_start(); $user = $_SESSION["username"]; echo $user; ?> and got these messages: ------------------------------------------------------------------------- Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\practice\page2.php:1) in C:\xampp\htdocs\practice\page2.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\practice\page2.php:1) in C:\xampp\htdocs\practice\page2.php on line 2 Kay ------------------------------------------------------------------------- I've tried to close the browser but still the messages appeared. Then i copy the page2.php to another folder, and when i opened again there is no problem. My question is where is my fault? Thank you
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.