Thanks for the reply 🙂
OK, I fixed it using:
if (is_uploaded_file($_FILES['picture']['tmp_name']) && is_uploaded_file($_FILES['thumb']['tmp_name'])) {
However i just hit another hurdle, having passed that section of code I got this error:
Warning: move_uploaded_file(1151722587safeshop.gif): failed to open stream: Permission denied in manage_edit.php on line 96
Warning: move_uploaded_file(): Unable to move '/tmp/phpa7mnce' to '1151722587safeshop.gif' in manage_edit.php on line 96
The image upload failed
** line 96 is:
move_uploaded_file ......
if (is_uploaded_file($_FILES['picture']['tmp_name']) && is_uploaded_file($_FILES['thumb']['tmp_name'])) {
//check if pictures were uploaded
// If all is ok, begin uploading pictures
$picture_name = time() . $_FILES['picture']['name'];
move_uploaded_file($_FILES['picture']['tmp_name'], $picDIR . $picture_name) // upload picture
or die ("The image upload failed");
$thumb_name = time() . $_FILES['thumb']['name'];
move_uploaded_file($_FILES['thumb']['tmp_name'], $thumbDIR . $thumb_name) // upload thumbnail
or die ("The thumbnail image upload failed");
echo "The images were successfuly uploaded."; // If all went ok, print success message
// Now add the data into the products database if a new picture was uploaded
Any ideas?