Jump to content

Recommended Posts

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>';
}
}
?>

Link to comment
https://forums.phpfreaks.com/topic/271304-php-mail-message-receiving/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.