Forum Moderators: coopster
if(move_uploaded_file($_FILES['fileupload']['tmp_name'], $target)) {
echo "". basename( $_FILES['fileupload']['name']).
" uploaded";
} else{
echo "Error Occurred!";
}
If $_REQUEST['fileupload'] is not empty and the file is uploaded, then you can send the email you considered sending, if it is empty you know for sure from the very begining, the person is not intending to send attachments.
Habtom
Set the values where it is important, probably in one of your global.php files (or something similar):
ini_set('upload_max_filesize', '8M');
Or even better in .htaccess file:
php_value post_max_size 8M
php_value upload_max_filesize 8M
If you can get the chance to edit the php.ini, you have the option there as well
Habtom
Just tried the upload detection code and it worked a treat.I wish if i can extend it so it checks the uploading user'email against the db,and if a match found,they are directed to just the thank you page (no email confirmation req)