Only thing I don't get is how to put the image name into the database
AND
putting the images/files into the right folder ... (in a back folder)
Here is some image upload directory help I need:
The code will WORK GOOD if I change
move_uploaded_file($tmp_name, "../../../images/component/uploads/$name");
-- TO --
move_uploaded_file($tmp_name, "uploads/$name"); ((work good like this))
BUT I dont want it in the folder...
<?php
foreach ($_FILES["pictures"]["error"] as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
$tmp_name = $_FILES["pictures"]["tmp_name"][$key];
$name = $_FILES["pictures"]["name"][$key];
move_uploaded_file($tmp_name,
"../../../images/component/uploads/$name");
echo "DONE! <br />";
echo $name . "<br />";
} else {
echo "Error <br />";
print_r ($_FILES);
}
}
?>
This returns errors...
Warning: move_uploaded_file(../../../images/component/uploads/me.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\wamp\www\shoppingcart\admin\test\imagetesting\add_images_processing.php on line 87
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'c:/wamp/tmp\php12B.tmp' to '../../../images/component/uploads/me.jpg' in C:\wamp\www\shoppingcart\admin\test\imagetesting\add_images_processing.php on line 87