在php上传图片

I'm trying to get an upload system going, which also logs the name of the file you uploaded and some other data to a mysql database. The logging of the name is working, but i cant seem to actually upload the image. It's nowhere to be found =(

HTML:

<form action="insert.php" method="post" enctype='multipart/form-data'>
<td>Photo/Video of the mistake</td>
<td>
<input type="hidden" name="size" value="350000">
<input type="file" name="photo"> 
</td>

PHP

$con=mysqli_connect("127.0.0.1","erlend","123","epicsoft");
$host="127.0.0.1"; // Host name 
$username="erlend"; // Mysql username 
$password="123"; // Mysql password 
$db_name="epicsoft"; // Database name 
$tbl_name="bugs"; // Table name 


$path="images/bugs"."/". basename($_FILES['photo']['name']);

mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select database");

$spill = $_POST['spill']; 
$tidspunkt = $_POST['tidspunkt'];
$rapportør = $_POST['rapportør'];
$beskrivelse = $_POST['beskrivelse'];
$media=($_FILES['photo']['name']);

$sql="INSERT INTO $tbl_name (spill, tidspunkt, rapportør, media, beskrivelse)
  VALUES ('$spill', '$tidspunkt', '$rapportør', '$media', '$beskrivelse')";

if (!mysqli_query($con,$sql)) {
    die('Error: ' . mysqli_error($con));
}

Thanks for reading!

try this

$sql="INSERT INTO `$tbl_name` ( `spill`, `tidspunk`, `rapportør`, `media`, `beskrivelse`)  VALUES ('$spill', '$tidspunkt', '$rapportør', '$media', '$beskrivelse');";