If you were to do algebra with php, it would get all messed up(in your mind):
Code:
$a3 = 4; //12
$a2 = 5; //10
$b = 7; //7
Mabye changing:
Code:
if (empty($from)) {
print "You have not entered an email, please go back and enter a valid email. We value your privacy and will never share it with any third parties... or forth and fifth parties. Never.";
} else {
if (empty($name)) {
print "You have not entered a name, please go back enter one... We don't mind if its not your real one.";
} else {
$send[0] = mail($to, $subject[0], $body, $headers[0]);
$send[1] = mail($from, $subject[1], $autoreply, $headers[1]);
print "Thank you".$name;
} else {
print "We encountered an error sending your mail, we would be eternally grateful if you were to notify webmaster@theartslab.com \n\n If you would like to contact us, you can send an email to info@theartslab.com as well.";
}
To:
Code:
if (empty($from)) {
print "You have not entered an email, please go back and enter a valid email. We value your privacy and will never share it with any third parties... or forth and fifth parties. Never.";
} else {
if (empty($name)) {
print "You have not entered a name, please go back enter one... We don't mind if its not your real one.";
} else if(!empty($name)){
$send[0] = mail($to, $subject[0], $body, $headers[0]);
$send[1] = mail($from, $subject[1], $autoreply, $headers[1]);
if($send[0] && $send[1]){
print "Thank you ".$name;
} else {
echo "We encountered an error sending your mail, we would be eternally grateful if you were to notify webmaster@theartslab.com \n\n If you would like to contact us, you can send an email to info@theartslab.com as well.";
exit;
} else {
print "We encountered an error sending your mail, we would be eternally grateful if you were to notify webmaster@theartslab.com \n\n If you would like to contact us, you can send an email to info@theartslab.com as well.";
}
Change the highlighted && to be || if you only care if one email was sent.
Bookmarks