General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 22nd, 2003, 09:23 AM
tekno tekno is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 3 tekno User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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???

Reply With Quote
  #2  
Old November 22nd, 2003, 09:28 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 6
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-

Reply With Quote
  #3  
Old November 22nd, 2003, 11:06 AM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
another solution to this is using a meta refresh tag

PHP Code:
<meta http-equiv="refresh\" content=\"0; url=\"(URL HERE)\" /> 


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

Reply With Quote
  #4  
Old November 24th, 2003, 07:09 AM
tekno tekno is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 3 tekno User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally posted by kode_monkey
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-


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...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Cannot add header information ??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT