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
<?php
define('GW_UPLOADPATH', 'images/');
$picture=$_FILES['photo_file'];
$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";
}
mysql_close($con);
?>
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