I'm trying to upload an image and save it to a specified directory on the server. Here's what I've got and the script runs fine but the image is NOT copied to the server. ???
$query = "SELECT * FROM photos";
$result = mysql_query($query);
$max = mysql_num_rows($result);
$temp = $max+1;
$name = "p_".$temp.".jpg";
// $image is the var name of the user's image to be uploaded
copy($image, "/home/ericwa/www/assets/photos/".$name."/");
unlink($image);