so I have to upload it before I embed the image in an email?
I got this code so far...
<?php
// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead
// of $_FILES.
$uploaddir = '/var/www/uploads/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
echo '<pre>';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}
echo 'Here is some more debugging info:';
print_r($_FILES);
print "</pre>";
?>
Can I change the $uploaddir to "/images/TEMP/";
If TEMP is the directory in the images folder to store all these images?
Can I check to make sure the file type is an image (bmp, gif, and jpg) before upload. And is it better if I store the uploads into Images[] instead of giving each upload its own name. How?
Thank you...