[Solved] Multiple Checkboxes

$name = $_POST[‘name’]; $email_body =”; <?php $aDoor = $_POST[‘formDoor’]; if(empty($aDoor)) { $email_body = “You didn’t select any buildings.”; } else { $N = count($aDoor); $email_body .= “You selected $N door(s): “; for($i=0; $i < $N; $i++) { $email_body .= $aDoor[$i] . ” “; } } ?> 0 solved Multiple Checkboxes

[Solved] Error in the last line of my PHP mail() script unexpected T_STRING [closed]

As noted in the comments, you haven’t closed off the $to variable. Set that to: $to = ‘[email protected], [email protected]’; And change your mail() function to: if(!mail($to,$email_subject,$email_body)) { echo ‘failed’; } else { echo ‘sent’; } You would get an error on the mail() line because you had one too many commas (,). NOTE The fourth … Read more

[Solved] Send HTML Email using PHP – Not working when using [email protected]?

For your question recently closed: https://stackoverflow.com/questions/34106770/send-email-using-php-from-address-not-working Try this: $headers .= “From: Your Name <$from>\r\n”; and you can also add the 5th mail parameter: mail($to, $subject, $body, $headers, ‘[email protected]’). Works for me with these headers: $from = “$name <$email>\r\n”; $to = “$username <$useremail>\r\n”; $headers=”MIME-Version: 1.0″ . “\r\n”; $headers .= ‘Content-type: text/html; charset=utf-8’ . “\r\n”; $headers .= … Read more

[Solved] Somehow a folder on my MS Outlook got deleted [closed]

To recover your email do the following Sign in to your Outlook.com account (via a Computer/Laptop) Go to your Deleted folder (found on the left pane under Folders) Look for “Lost a message?”, and click “recover deleted messages” For more: https://groups.google.com/forum/?hl=en#!topic/deleted-dbx-files-want-to-restore/Mg9-5RTzCR8 solved Somehow a folder on my MS Outlook got deleted [closed]

[Solved] Send 2 e-mails with mail()

My first guess is that you’re sending an email to “[email protected]” which will surely won’t work. Unless I’m mistaken, it should work if $to is a valid email address. edit Alright, then check this out, not really a direct answer to the first problem. But I’d consider using something like this: https://github.com/Synchro/PHPMailer Unless you have … Read more

[Solved] Query database then email posts from where user is subbed to

I figured it out. Just use ob_start(), and loop through each user. Select the posts they’re subscribed to. Then inside the loop email it to each user. I used this query SELECT articles.* FROM articles INNER JOIN subscriptions ON articles.from_id = subscriptions.sub_to INNER JOIN users ON subscriptions.user_id = users.id WHERE users.email = :email 5 solved … Read more