This is my code..!!!
i use ob_start() but still i m getting header error
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\flower\upload1.php:1) in C:\xampp\htdocs\flower\upload1.php on line 30
can anyone tell me where m i wrong.??
why this is error is related to header only..!!!
is there any other way to jump from one page to another..??
<?php
ob_start();
include_once('config.php');
//This is the directory where images will be saved
$target = "photos/";
$target = $target . basename($_FILES['photo']['name']);
//This gets all the other information from the form
$firstname=$_POST['fname'];
$lastname=$_POST['lname'];
$bdate=$_POST['bdatey'].'-'.$_POST['bdatem'].'-'.$_POST['bdated'];
$ddate=$_POST['ddatey'].'-'.$_POST['ddatem'].'-'.$_POST['ddated'];
$creator=$_POST['creator'];
$pic=($_FILES['pic']['name']);
$about=$_POST['description'];
echo $bdate;
echo $ddate; exit();
//Writes the information to the database
mysql_query("INSERT INTO members (member_name,member_pic,member_description,member_creator,date_of_birth,date_of_death,country)
VALUES('$name', '$pic', '$about','$creator','$bdate','$ddate','India')") or die(mysql_error());
if(move_uploaded_file($_FILES['pic']['tmp_name'], $target))
{
header('location:upload.phpq=1');
}
else {
header('location:upload.php?q=2');
}
?>