|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Cannot add header information ??
I've stucked with this
Cannot add header information - headers already sent by (output started at d:\dir\file.php:141) in d:\dir\file.php on line 1240 It's giving me same error whatever I do !? Here is the code: if ($insertData == true) { $query = mysql_query("SELECT Property_ID FROM Property_Info WHERE User_ID = '" . $_SESSION["Session_UserID"] . "' ", $connection); while ($row = mysql_fetch_array($query)) { $Property_ID = $row["Property_ID"]; } session_start(); session_register("Property_ID"); header("Location: /members/upload_photo.php"); } @mysql_close($connection); Can anyone help??? |
|
#2
|
|||
|
|||
|
As of php 4.3 you cannot use this method for redirecting the page after something has been sent already.
Unfortunately I can't help you with a solution to this one so hopefully someone else can point you in the right direction. I would be interested to hear some options myself. -KM- |
|
#3
|
|||
|
|||
|
another solution to this is using a meta refresh tag
PHP Code:
just put this at the location u want to refresh and it will refresh when it gets to that command...i know i have the same problems this is the only solution i think unless you use obflush but that gets complicated...if u just want to redirect when a user logs in or something like that, this is the way to go...give it a try let me know if it works for u |
|
#4
|
|||
|
|||
|
Quote:
Why's that? I'm using 4.2.3 php version on Windows XP and it works, if it doesn't work on 4.3 I will KILL MY SELF! Also I've solved the problem with ob_start() and ob_end_flush(). I've simply inserted ob_start() at the start of file and ob_end_flush() at the end of it. Everythings works fine for now... |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Cannot add header information ?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|