0

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!";	
				}
		?>
3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by diafol
0

show your form - does it have an enctype attribute?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.