Im trying to upload a file into my table in mysql and it giving me this error " Notice: Undefined index: pictu in C:\wamp\www\closer\get.php on line 13"
I know this is basic stuff but i don't understand the error and why its giving me it.
Any help would be great.
//////////////////// the index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<form action="get.php" method="post" enctype="multipart/form-data">
<input type="text" name="title" /><br/>
<input type="file" name="Pictu" /><br/>
<input type="submit" name="Sumber" value="ClickClack" />
</form>
</html>
//////////////////////// the get.php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("project", $con);
$sql="INSERT INTO media (Name, pic)
VALUES
('$_POST[title]','$_POST[pictu])";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con);