im having problem saving a FILE, i doesn't save the extension name of the file and doesn't save also the images in my folder..? can you kindly look , what is my problem with my FILE code?
only in FILE SAVE, i dont have errors in my other fields.
<?php
include("connect.php");
if(isset($_POST['submit']))
{
$f=$_FILES['pic']['name'];/*<----------------- here's my code*/
mysql_query("insert into teacher(staffid,password,lastname,firstname,middlename,contactno,religion,birthdate,address,handle,datehired,status,pic)VALUES('$_POST[staffid]',
'$_POST[pass]',
'$_POST[lname]',
'$_POST[fname]',
'$_POST[mname]',
'$_POST[contactno]',
'$_POST[religion]',
'$_POST[birthdate]',
'$_POST[address]',
'$_POST[handle]',
'$_POST[dhired]',
'$_POST[status],$f");/*<-----------------here's my code*/
move_uploaded_file($_FILES['pic']['tmp_name'], "files/".$f); /*<----------------- here's my code*/
$msg="New Record Added!";
}
?>