Hi all,
I'm getting this error in my browser when using a login script. I'm checking a username and password against a database and if successful, registering a session.
Warning: session_register() [function.session-register]: Cannot send session cookie - headers already sent by (output started at /home/val2435/public_html/newsite/checklogin.php:9) in /home/val2435/public_html/newsite/checklogin.php on line 38
Warning: session_register() [function.session-register]: Cannot send session cache limiter - headers already sent (output started at /home/val2435/public_html/newsite/checklogin.php:9) in /home/val2435/public_html/newsite/checklogin.php on line 38
Warning: Cannot modify header information - headers already sent by (output started at /home/val2435/public_html/newsite/checklogin.php:9) in /home/val2435/public_html/newsite/checklogin.php on line 40
Can anyone help?
error when using login script
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: error when using login script
You have already sent some output before line 38. It could be obvious HTML output or a space or return before a <?php or after a ?>
(#10850)
Re: error when using login script
you need to use session_start() and cookie functions before any output is sent to the browser
try this one
i've use this login script..so far...it works!....it has the database script,registering script,login script and logout script.
----->>>> http://php.about.com/od/finishedphp1/ss ... code_4.htm
regards,
Azhan
________________________________________
http://www.productcoverdesign.com - Cheapest E-Cover u'll ever get!
----->>>> http://php.about.com/od/finishedphp1/ss ... code_4.htm
regards,
Azhan
________________________________________
http://www.productcoverdesign.com - Cheapest E-Cover u'll ever get!