Hi All,
I want attachment to send with the email when a prospect clicks on submit button.
I used this code:
but I could not receive any attachment in my mail, I'm new to PHP so Can anyone help me for this how can I get attachement in my mail.
Thanks in advance!
I want attachment to send with the email when a prospect clicks on submit button.
I used this code:
Code:
$allowed = array( 'jpg', 'gif','zip');
if(isset($_FILES['upl']) && $_FILES['upl']['error'] == 0){
$extension = pathinfo($_FILES['upl']['name'], PATHINFO_EXTENSION);
if(!in_array(strtolower($extension), $allowed)){
echo '{"status":"error"}';
exit;
}
if(move_uploaded_file($_FILES['upl']['tmp_name'], 'uploads/'.$_FILES['upl']['name'])){
echo '{"status":"success"}';
exit;
}
}
echo '{"status":"error"}';
exit;
Thanks in advance!
Comment