Modernvox Posted November 17, 2009 Share Posted November 17, 2009 Won't send to address <html> <body> <?php if(isset($_POST['submit'])) $dimen1 = $_POST['room1']; $dimen2 = $_POST['room2']; $dimen3 = $_POST['room3']; $dimen4 = $_POST['room4']; $dimen5 = $_POST['room5']; $email = $_POST['email'];' $sum= $dimen1 + $dimen2 + $dimen3 + $dimen4 + $dimen5; printf("$%01.2f", $sum); echo "Your estimate is \$$sum; $to = 'myemail@aol.com'; $subject = 'You have an estimate request'; $msg = 'Estimate Total': \$$sum\n" . mail($to, $subject, $msg, 'From:' . $email); ?> </body> </html> Error: Parse error: syntax error, unexpected T_STRING in /home/a7250761/public_html/getquote.php on line 62 Quote Link to comment Share on other sites More sharing options...
geudrik Posted November 17, 2009 Share Posted November 17, 2009 you have an open ' after your last $email = $_POST edit: have your $msg var in double quotes, as if you put $msg = 'Estimated Total:' . .. Wait, lot's of quotational mistakes... Try this.. <html> <body> <?php if(isset($_POST['submit'])) $dimen1 = $_POST['room1']; $dimen2 = $_POST['room2']; $dimen3 = $_POST['room3']; $dimen4 = $_POST['room4']; $dimen5 = $_POST['room5']; $email = $_POST['email']; $sum= $dimen1 + $dimen2 + $dimen3 + $dimen4 + $dimen5; // printf("$%01.2f", $sum); echo "Your estimate is: $ $sum"; $to = 'myemail@aol.com'; $subject = 'You have an estimate request'; // Look at your quotes... Where do open and close? // Doesnt work => $msg = 'Estimate Total': \$$sum\n" . $msg = "Estimate Total: $ $sum"; mail($to, $subject, $msg, 'From:' . $email); ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
Modernvox Posted November 17, 2009 Author Share Posted November 17, 2009 you have an open ' after your last $email = $_POST edit: have your $msg var in double quotes, as if you put $msg = 'Estimated Total:' . .. Wait, lot's of quotational mistakes... Try this.. <html> <body> <?php if(isset($_POST['submit'])) $dimen1 = $_POST['room1']; $dimen2 = $_POST['room2']; $dimen3 = $_POST['room3']; $dimen4 = $_POST['room4']; $dimen5 = $_POST['room5']; $email = $_POST['email']; $sum= $dimen1 + $dimen2 + $dimen3 + $dimen4 + $dimen5; // printf("$%01.2f", $sum); echo "Your estimate is: $ $sum"; $to = 'myemail@aol.com'; $subject = 'You have an estimate request'; // Look at your quotes... Where do open and close? // Doesnt work => $msg = 'Estimate Total': \$$sum\n" . $msg = "Estimate Total: $ $sum"; mail($to, $subject, $msg, 'From:' . $email); ?> </body> </html> Excellent review and repair. Thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.