Am using this code(shown below) 4 uploading an image.
while using this getting an error like 'there was an error moving the uploaded file"
what could be the reason for this?
Though an error occurs,am still able to upload the image successfully. ie the image is saved at tha intended loaction.
if($_POST["action"] == "Upload Image")
if(!isset($_FILES) && isset($HTTP_POST_FILES))
$_FILES = $HTTP_POST_FILES;
$error["image_file"] = "An image was not found.";
$imagename = basename($_FILES);
$error["imagename"] = "The name of the image was not found.";
$newimage = "images/" . $imagename;
$result = @move_uploaded_file($_FILES, $newimage);
$error["result"] = "There was an error moving the uploaded file.";