Hi everyone, I am new here and new to php. I am working on a form with a image upload. I have to upload the image to the image folder and then write the image name to a mysql database. I am able to upload the image but I am unable to write the image name to the database.

<?php include("db_connect.php");?>
<?php // select the database in which to add a table

$sql ="INSERT INTO drivers_0115061 (ln,fn,month,day,year,img,email)
VALUES ('".$_POST["ln"]."',

//$sql="INSERT INTO people (fn,ln,dob,city,prov,pc,gender,hc,nod) VALUES ('steve','douglas',1234567,'winnipeg','manitoba','r3p 6g5','m','grey',2)";

//echo $sql;

mysql_query($sql, $con);
echo mysql_error();

// if(move_uploaded_file($_FILES["img"]["tmp_name"],$target_file))
// {
// echo "It Worked!";
// echo "<a href='".$target_file."'target='_blank'/>".$target_file."</a>";
// }
// else
// {
// echo "Crap No Go!";
// }

<?php include("db_close.php");?>

html form (snippet):
<input type="hidden" name="MAX_FILE_SIZE" value="10000000"/>
<input type="file" id="img" name="img"/>

If anyone can help me out I would be forever grateful.

Thanks in advance,