Mr_J Posted April 21, 2009 Share Posted April 21, 2009 Hi all, When I "send", I only receive half the info submitted. <?php $name = $_POST['name']; $tel_no = $_POST['tel_no']; $email_address = $_POST['email']; $message = $_POST['message']; if($error_occured=="no") { $to = "[email protected];"; $bc =. "[email protected]"; $cc =. "[email protected]"; $email_from = $email_address; $email_subject = "From Bostonterrier.za.net"; $email_body = "New message: Name = " . $name . ", Telephone No = " . $tel_no . ", Message = ". message; $headers = "From: $email_from"; mail($to,$bc,$cc,$email_address,$email_subject,$email_body,$headers); } ?> I have HTML which include my .php file as ACTION in the form <form method="POST" name="contact" action="contact-form-handler.php"> Any help please Thanks Link to comment https://forums.phpfreaks.com/topic/155036-solved-mail-form-again/ Share on other sites More sharing options...
saint959 Posted April 21, 2009 Share Posted April 21, 2009 Hi, Is this not supposed to be $message and not just message? <?php $email_body = "New message: Name = " . $name . ", Telephone No = " . $tel_no . ", Message = ". [b]$[/b]message; ?> Link to comment https://forums.phpfreaks.com/topic/155036-solved-mail-form-again/#findComment-815427 Share on other sites More sharing options...
Mr_J Posted April 21, 2009 Author Share Posted April 21, 2009 I mistyped the code... There is a $ at message... If the php is fine, it means I have a problem in the HTML...? Link to comment https://forums.phpfreaks.com/topic/155036-solved-mail-form-again/#findComment-815433 Share on other sites More sharing options...
saint959 Posted April 21, 2009 Share Posted April 21, 2009 What info is not being submitted? What section of the email are you not getting? Link to comment https://forums.phpfreaks.com/topic/155036-solved-mail-form-again/#findComment-815436 Share on other sites More sharing options...
PFMaBiSmAd Posted April 21, 2009 Share Posted April 21, 2009 This line is significantly incorrect - mail($to,$bc,$cc,$email_address,$email_subject,$email_body,$headers); Please start by reading the mail section in the php manual - http://www.php.net/manual/en/function.mail.php Link to comment https://forums.phpfreaks.com/topic/155036-solved-mail-form-again/#findComment-815438 Share on other sites More sharing options...
Mr_J Posted April 21, 2009 Author Share Posted April 21, 2009 This is why I love this forum, over here there is alot of info made available to the people trying... Thanks for the link PFMaBiSmAd Link to comment https://forums.phpfreaks.com/topic/155036-solved-mail-form-again/#findComment-815453 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.