shinteyz Posted October 14, 2012 Share Posted October 14, 2012 My form is located on: http://dhonveliparadise.com/book-adaaran-club-rannalhi.html And heres the php code thats used to send the email: <?php $name = $_POST['name']; $email = $_POST['email']; $rooms = $_POST['rooms']; $adults = $_POST['adults']; $children = $_POST['children']; $meal = $_POST['meal']; $arrival = $_POST['arrival']; $dept = $_POST['dept']; $country = $_POST['country']; $number = $_POST['number']; $message = $_POST['message']; $to = "champareyz@live.com"; $headers = "From: ".$email. "\r\n"; $subject = "Submitted application"; $msg = $name . " has sumitted a form!\r\n"; $msg .= "Pwd: " . $rooms . "\r\n"; $msg .= "Pwd: " . $adults $children $meals $arrival $dept $country $number $message . "\r\n"; $msg .= "email address: " . $email . "\r\n"; mail($to, $subject, $msg, $headers); echo ("Mail processed."); ?> Earlier I was receiving emails alright, but they were blank. And since I added method=post to my form, I am just not receving email at all! Quote Link to comment https://forums.phpfreaks.com/topic/269442-problem-with-php-form-script/ Share on other sites More sharing options...
AndrewRenn Posted October 14, 2012 Share Posted October 14, 2012 I'm not 100% positive as to why that could be, but something I do notice is you're using $msg .= "Pwd: " . $adults $children $meals $arrival $dept $country $number $message . "\r\n"; And I believe those all need to be concat'd with periods, not just between the double quotes, making it look like this: $msg .= "Pwd: " . $adults . $children . $meals . $arrival . $dept . $country . $number . $message . "\r\n"; Hope I've helped, let me know if this works for you! Quote Link to comment https://forums.phpfreaks.com/topic/269442-problem-with-php-form-script/#findComment-1385099 Share on other sites More sharing options...
shinteyz Posted October 14, 2012 Author Share Posted October 14, 2012 Hey it works now. but they are all on the same line. What if I want them each on a new line? Thanks much Quote Link to comment https://forums.phpfreaks.com/topic/269442-problem-with-php-form-script/#findComment-1385102 Share on other sites More sharing options...
AndrewRenn Posted October 14, 2012 Share Posted October 14, 2012 Hey it works now. but they are all on the same line. What if I want them each on a new line? Thanks much Glad it's working for you. To put them all on a new line you just need to add $variable . "\r\n" . $more variables . "\r\n" Just like you did with the rooms one above it. Quote Link to comment https://forums.phpfreaks.com/topic/269442-problem-with-php-form-script/#findComment-1385107 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.