I'm working on a backoffice to uploaded images so you can change the images in the front. Problem is my upload script isn't returning me any errors to work with, but it's also not moving the file. I want my script to upload the new file to that location and replace any file with the same name regardless, but I'd have to get the moving working first.
Where am I going wrong?
================================================================================== EDIT: I've added the slash to the path. It still won't upload my image though. Code is as follows:
$target_path = "../../site/images/user_images/";
$image_name = $_POST['filename'].".".pathinfo($_FILES['file']['name'],PATHINFO_EXTENSION);
if(move_uploaded_file($_FILES['file']['tmp_name'], $target_path.$image_name)) {
echo "<meta http-equiv='refresh' content='0;URL=images.php?saved=true' />";
} else {
echo "Error";
}