Is this PHP image upload script correct?

  • Thread starter Thread starter Cathy V
  • Start date Start date
C

Cathy V

Guest
1.Here is my script:

<?

$file = $_FILES['picture']['name'];
$temp = $_FILES['picture']['tmp_name'];
$path = 'pictures/';
$uploadfile = $path.basename($temp);
move_uploaded_file ($temp,$uploadfile);
$query = "INSERT INTO tablename VALUES ('$uploadfile')";
mysql_query($query);

?>

2. the script uploads an encrypted PHP file to the "pictures" folder
and to the "Picture" field of my database.

3. is the script correct?

Thank you so much in advance for helping
 
Back
Top