giedriukxx Posted November 28, 2012 Share Posted November 28, 2012 Hello everyone i'm new here i have a little problem with php mail trying to figure out but no lucky thats why i come here i hope i get some help. the problem is im receiving only the message form mail form atm. i need like this Name: jon Message: i would like to talk about Phone: 111111111 Time: 14:00PM Here is form code <?php include 'config.php'; error_reporting (E_ALL ^ E_NOTICE); $post = (!empty($_POST)) ? true : false; if($post) { include 'functions.php'; $name = stripslashes($_POST['name']); $email = trim($_POST['email']); $message = stripslashes($_POST['message']); $phone = stripslashes($_POST['phone']); $time = stripslashes($_POST['time']); $error = ''; // Check name if(!$name) { $error .= 'I think you forget to enter your name.<br />'; } // Check email if(!$email) { $error .= 'I think you forget to enter your e-mail id.<br />'; } if($email && !ValidateEmail($email)) { $error .= 'Invalid E-mail id !!!<br />'; } // Check phone if(!$phone) { $error .= 'I think you forget to enter phone number.<br />'; } // Check time if(!$phone) { $error .= 'I think you forget to enter the time.<br />'; } if(!$error) { $mail = mail(WEBMASTER_EMAIL, $subject, $message, "From: ".$name." <".$email.">\r\n" ."Reply-To: ".$email."\r\n" ."X-Mailer: PHP/" . phpversion()); if($mail) { echo 'OK'; } } else { echo '<div class="notification_error">'.$error.'</div>'; } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/271304-php-mail-message-receiving/ 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.