php Cannot modify header information
Posted
by mohan286
on Stack Overflow
See other posts from Stack Overflow
or by mohan286
Published on 2010-05-01T16:19:38Z
Indexed on
2010/05/01
16:27 UTC
Read the original article
Hit count: 168
php5
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\program\products\addproduct.php:48) in C:\xampp\htdocs\program\products\addproduct.php on line 77
$s=$_REQUEST;
$s=$s[subcategory];
$n=$_POST["productname"];
$p=$_POST["productprice"];
$d=$_POST["productdes"];
$i=$_POST["productimage"];
$sql="INSERT INTO products (product_name,subcat_id ,price,description,product_image) VALUES ('$n','$s','$p','$d','$i')";
//"INSERT INTO freshers_details "."VALUES "."('$name','$mobile','$qualif','$addr','$gender','$mailid')";
if(mysql_query($sql,$con))
{
header('Location: http://localhost/program/products/products_listing.php');
}
else
{
die('Error: ' . mysql_error());
}
mysql_close($con);
}
© Stack Overflow or respective owner