Forums
 This topic is locked 
             header problem
 Posted 03 Dec 2003  11:12:19 
  1 
     has   voted 
  03 Dec 2003  11:12:19 Jean Luc Mezzapelle posted: 
 I use the pure php upload and the smart image processor to insert image on a web site.it perfectly works but i have a damned warning message " header already send...."
This is because the piece of code
header(sprintf("Location: %s", $insertGoTo));
is located at the bottom of the generate code.
i also use a cookie protection who also send header, but at the top of the page.
My problem is : how can i organize the code ? whan i try to move the header at the top of the page, it kills the insert behavior.
Thank you for hel !
Replies
 Replied 06 Dec 2003  13:25:37 
   06 Dec 2003  13:25:37 Kathlyn Gadd replied: 
  Have you any hard returns or spaces?  
You say you are using two php behaviours in the same page - are they both enclosed in their own php tags - with a hard return between them? If so, this could be causing the header error...
  You say you are using two php behaviours in the same page - are they both enclosed in their own php tags - with a hard return between them? If so, this could be causing the header error...
 Replied 08 Dec 2003  10:37:34 
   08 Dec 2003  10:37:34 bob bob replied: 
  >are they both enclosed in their own >php tags ?
They were not, that was the problem !
  They were not, that was the problem !