I have a html code as below through which I give image file as input

 <input name="photo_file" type="file" />

then anather php file to insert record into database code is as below

define('GW_UPLOADPATH', 'images/');
$target= GW_UPLOADPATH . $picture ;

$con = mysql_connect("localhost","root","");
if (!$con)
  die('Could not connect: ' . mysql_error());

mysql_select_db("demo", $con);
if (move_uploaded_file($_FILES['photo_file']['tmp_name'], $target))
mysql_query("INSERT INTO feedback (photo)VALUES ('".$picture."')");

echo "record inserted";

I got error as below
Notice: Undefined index: photo_file in C:\wamp\www\shilpa\send.php on line 3

will anybody help me I tried all possible ways:( now needs help Thank you in advance

$_FILES['photo_file'] does not exist for some reason. Good practice is to check for existance first:

if(!isset($_FILES['photo_file'])) {

    // handle the wrror the way you see fit
    die('Error uploading the file');

// code for normal processing

Line 3 should get the name of the file instead of the array:

$picture=$_FILES['photo_file']['name'];  // Gets the original file name.

Also make sure your form has the attribute enctype="multipart-formdata" so it posts FILE data to your php file.