<td valign='top'> <input type='hidden' name='MAX_FILE_SIZE' value='12485760' /> Image?</td> <td><input type='file' name='image'> $path = 'uploads/'; $path .= basename($_FILES['image']['name']); $path = addslashes($path); $name = $_FILES['image']['name']; echo $path; move_uploaded_file($_FILES['image']['tmp_name'], $path);
The above code should work as i have a very similar one working neatly. However, it does not seem to pick anything up from the form (the very top code). If anyone could point out how i’m being a fool and breaking this, i would be much appreciative.
Make sure you have the attribute
enctype='multipart/form-data'on your<form>tag.