PHP Error

Reply

Join Date: May 2005
Posts: 23
Reputation: n2ads is an unknown quantity at this point 
Solved Threads: 0
n2ads's Avatar
n2ads n2ads is offline Offline
Newbie Poster

PHP Error

 
0
  #1
Aug 9th, 2005
I have a classified site and when I try to add a listing through the site admin panel I get the following error:

Warning: Cannot modify header information - headers already sent by (output started at /home/n2ads/public_html/includes.php:292) in /home/n2ads/public_html/siteadmin/AddOffer.php on line 54

Can someone help me fix it?
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 138
Reputation: sarahk is an unknown quantity at this point 
Solved Threads: 1
sarahk's Avatar
sarahk sarahk is offline Offline
Junior Poster

Re: PHP Error

 
0
  #2
Aug 9th, 2005
Somewhere in the script something is being sent to the browser and then it's trying to redirect - and failing. given your lack of PHP skills (http://www.daniweb.com/techtalkforum...threadid=30089) you might be better trying to tackle the basics of PHP before trying to work your way through debugging this script.

The problem, however may be as simple as a space or blank line before the <?php in AddOffer.php

Sarah
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 781
Reputation: Zachery has a spectacular aura about Zachery has a spectacular aura about 
Solved Threads: 21
Team Colleague
Zachery's Avatar
Zachery Zachery is offline Offline
The Geek Father

Re: PHP Error

 
0
  #3
Aug 9th, 2005
Sounds like you have whitespace somewhere there shouldn't be
Firefox: no, its not the end all solution, it has its own issues and in time it will be just as insecure as IE, when its hit Firefox 6, if it makes it that far. Oh, and AOL pays for it, incase you didn't know.

Microsoft & Windows: If you hate it so much, move to linux, or bsd, or anything else, stop complaning and move on.
Good starting places: Gentoo Novell SUSE Fedora Core Apple
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 23
Reputation: n2ads is an unknown quantity at this point 
Solved Threads: 0
n2ads's Avatar
n2ads n2ads is offline Offline
Newbie Poster

Re: PHP Error

 
0
  #4
Aug 9th, 2005
Here is my AddOffer.php code can someone tell me where it is going wrong?

<?
require_once("conn.php");

if(isset($_POST[s1]))
{
if(!empty($_FILES[images][name][0]))
{
while(list($key,$value) = each($_FILES[images][name]))
{
if(!empty($value))
{
$NewImageName = $t."_offer_".$value;
copy($_FILES[images][tmp_name][$key], "re_images/".$NewImageName);

$MyImages[] = $NewImageName;
}
}

if(!empty($MyImages))
{
$ImageStr = implode("|", $MyImages);
}

}

$catInfo = explode("|", $_POST[SelectCategory]);
$CategoryID = $catInfo[0];
$SubcategoryID = $catInfo[1];

$q1 = "insert into re2_listings set
AgentID = '$_SESSION[AgentID]',
CategoryID = '$CategoryID',
SubcategoryID = '$SubcategoryID',
address = '$_POST[address]',
city = '$_POST[city]',
state = '$_POST[state]',
country = '$_POST[country]',
ShortDesc = '$_POST[ShortDesc]',
DetailedDesc = '$_POST[DetailedDesc]',
Price = '$_POST[Price]',
PropertyType = '$_POST[PropertyType]',
image = '$ImageStr',
DateAdded = '$t' ";

mysql_query($q1);

}

header("location:manage.php");
exit();
?>
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC