| | |
PHP Error
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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?
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?
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
The problem, however may be as simple as a space or blank line before the <?php in AddOffer.php
Sarah
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
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
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();
?>
<?
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();
?>
![]() |
Similar Threads
- PHP parsing error, unexpected '<' (PHP)
- Simple php error (PHP)
- Interesting, yet probably simple, PHP Nuke Error (PHP)
- Parse Error in PHP (PHP)
- php error HELP!!! (PHP)
- Php Syntax Error (PHP)
- php error when using invision board (PHP)
Other Threads in the PHP Forum
- Previous Thread: PHP Includes???
- Next Thread: Integrating Php question
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax alerts apache api array beginner binary broken cakephp checkbox class cms code convert cron curl database date directory display download dynamic echo email error file files folder form forms function functions google hack href htaccess html htmlspecialchars image include insert integration ip java javascript joomla limit link login loop mail menu methods mlm mod_rewrite multiple mysql network object oop overwrite parse paypal pdf php problem query radio random recursion redirect regex remote script search securephp server sessions sms soap source space sql structure syntax system table tutorial update upload url validation validator variable video web xml youtube





