|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
header error
ive created a login script with 4 different levels...when you login it checks the users name against the databse and determines what level they are.... after i press login i get this error message then i get the info im supposed to be getting
Warning: Cannot modify header information - headers already sent by (output started at /home2/bruski/public_html/index.php:4) in /home2/bruski/public_html/auth.php on line 23 Warning: Cannot modify header information - headers already sent by (output started at /home2/bruski/public_html/index.php:4) in /home2/bruski/public_html/auth.php on line 24 lines 24 and 25 are as followed: PHP Code:
thx...is it the cookie header thats being sent out or something else? |
|
#2
|
|||
|
|||
|
Definitly something else. Obviously something has already sent headers on line 4 (it staits so in your error message). So check the script if you are outputing anything that might cause the headers to be sent (any echo, print, even a blank space will mess things up for you). Check and if you don't find the problem, post up to the 4th line here.
Another possibility would be to use ob_start() and ob_end_flush(). Hope it helps. |
|
#3
|
|||
|
|||
|
4th line of the index? if thats the case here it is
<style type="text/css" title="currentStyle"> @import "./style.css"; </style> |
|
#4
|
|||
|
|||
|
Quote from the manual for setcookie():
Quote:
You cannot output anything before you call setcookie(). Put anything that has to do with cookies before that 4th line. That should do the trick. Otherwise check the menitioned functions to work around this problem (ob_start() & ob_end_flush()). Last edited by _rainbow_ : September 10th, 2003 at 05:45 AM. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > header error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|