dear coder,
Recently i search over the net and obtain some mail function code, and trying to add in addition information
I have create a form (order.htm)and trying to call the (order.php) php code as below
PHP Code:
<?php $ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$client = $_POST['client'];
$clientmail = $_POST['clientmail'];
$clientdomain = $_POST['clientdomain'];
$clientaddress = $_POST['clientaddress'];
$clientphone = $_POST['clientphone'];
$clientpromo = $_POST['clientpromo'];
$clientpackage = $_POST['clientpackage'];
$clientpayment = $_POST['clientpayment'];
$clientcomment = $_POST['clientcomment'];
if (eregi('http:', $clientcomment)) {
die ("Do NOT try that! ! ");
}
if(!$clientmail == "" && (!strstr($clientmail,"@") || !strstr($clientmail,".")))
{
echo "<h2>Use Back - Enter valid e-mail</h2>\n";
$badinput = "<h2>order was NOT submitted</h2>\n";
echo $badinput;
die ("Use back! ! ");
}
if(empty($client) || empty($clientmail) || empty($clientdomain) || empty($clientaddress) || empty($clientphone) ) {
echo "<h2>Use Back - fill in all fields (Require)</h2>\n";
die ("Use back! ! ");
}
$todayis = date("l, F j, Y, g:i a") ;
$attn = $clientpackage ;
$subject = $attn;
$clietcomment = stripcslashes($clientcomment);
$message = " $todayis [EST] \n
Attention: $attn \n
Subject : $subject \n
Message: $clientcomment \n
From: $Client ($clientmail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";
$from = "From: $clientmail\r\n";
mail("host@privatehoster.com", $subject, $message, $from);
?>
display area
PHP Code:
<p align="center">
Date: <?php echo $todayis ?>
<br>
Thank You : <?php echo $client ?> ( <?php echo $clientmail ?> )
<br>
Thank for purchasing : <?php echo $clientpackage ?>
<br>
Once we receive the payment, we will send you the login detail at <?php echo $clientmail ?> <br>
<?php $notesout = str_replace("\r", "<br/>", $clientcomment);
echo $notesout; ?>
<br>
<?php echo $ip ?>
When I receive the email, the information display are missing,
the problem probably come from
mail("host@privatehoster.com", $subject, $message, $from);
but i have no idea how to modify it...
can some one give me some guide?