if (is_uploaded_file($_FILES['image']['temp_name'])){
$temp = '../../uploads/' . md5($_FILES['image']['name']);
if (move_uploaded_file($_FILES['image']['temp_name'], $temp)){
echo '<p>The file has been uploaded!</p>';
$i = $_FILES['image']['name'];
} else {
$errors[] = 'The file could not be moved.';
$temp = $_FILES['image']['temp_name'];
}
} else {
$errors[] = 'No file was uploaded.';
$temp = NULL;
}
i have got this code to upload files but every time i run the script it returns the message 'no file was uploaded'. i have specified the directory of the temp upload folder in the php.ini and have looked through the rest of the code but cant find a problem, can anyone help please?
thanks.