0

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\samples\htmls\login.php:7) in C:\xampp\htdocs\samples\htmls\login.php on line 39

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\samples\htmls\login.php:7) in C:\xampp\htdocs\samples\htmls\login.php on line 39

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\samples\htmls\login.php on line 41
Wrong Username or Password
can anyone tell me what went wrong? thou i cant find any error i think in my code..
:confused:

4
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by faroukmuhammad
0

Session can not be initiated since HTTP headers have already been sent. The thing is that session sets a cookie which is sent as a header directive. All headers HAVE TO be sent before and only before any content is sent (this is the requirement of the HTTP protocol not PHP).

The reason for this error is in that your script may be sending some content on line 39 (maybe just one space). Have a look there, remove content content or place the session_start() earlier in the script. If it does not help post the code.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.