i got error msg as follow :
Warning: move_uploaded_file() expects parameter 1 to be string, array given in E:\wamp\www\myweb\admin\upload.php on line 21
can anybody show e what's wrong with my script? pls
<?php
$locate = $_FILES['fupload']['tmp_name'];
$name = $_FILES['fupload']['name'];
$size = $_FILES['fupload']['size'];
$direktori = "../gallery/$name";
// if file exist
if (file_exists($direktori)){
echo "Upload Failed !!! <br>";
}
else{
move_uploaded_file($locate,"$direktori"); // line 21
$input="INSERT INTO tb_gallery(gal_name,gal_size)
VALUES('$name','$size')";
mysql_query($input);
}
?>