I've been building a questionnaire and testing it with a PHP code I built for sending the results to my Gmail account once a user submits it and it has been working fine as I've tested it on different sections. Now that the entire questionnaire is complete and I tested it, I haven't received the email yet and it's been over 3 hours since submitting it.
here's the PHP I've been using
it echos the message indicating it successfully went through so I have no clue as to what the problem is.
here's the PHP I've been using
PHP:
<?php ini_set('display_errors','on'); ?><?php
$body="";
foreach ($_POST as $key => $value) {
$body.= str_replace("_"," ",$key).":\n\n ". $value."\n\n\n\n";
}
$from = 'From: Your_New_Client';
$to = 'myemailaccount@gmail.com';
$subject = 'A New Questionnaire';
?>
<?php
if (!isset($_POST['submit'])||($_POST['submit'])) {
if (mail ($to, $subject, $body, $from)) {
echo '<p>Your questionnaire has been submitted! You will be contacted with further assistance once everything is reviewed.</p>';
} else {
echo '<p>Something went wrong, go back and try again!</p>';
}
}
?>
it echos the message indicating it successfully went through so I have no clue as to what the problem is.