2012-05-16 2 views
-2

здесь process.php. Я хочу, чтобы получить электронную почту с адреса электронной почты на форме, чтобы я мог ответить на нихответ на адрес электронной почты от

<?php 

$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/")); 

// To send HTML mail, the Content-type header must be set 
    $headers = "MIME-Version: 1.0\n"; 
    $headers .= "Content-Type: text/html; charset=ISO-8859-1\n"; 
    $headers .= "From: " . $_POST['field_9'] . "\n"; 
    $headers .= "Reply-To: ". $_POST['field_9'] . "\n"; 

mail("[email protected]","Reservaion Enquiry","Form data: 


Preferred Arrival Date : " . $_POST['field_1'] . " 
Preferred Departure Date: " . $_POST['field_2'] . " 
Room Category: " . $_POST['field_3'] . " 
Adults: " . $_POST['field_4'] . " 
Children: " . $_POST['field_5'] . " 
Please contact me by: " . $_POST['field_6'] . " 
First Name: " . $_POST['field_7'] . " 
Last Name: " . $_POST['field_8'] . " 
Email: " . $_POST['field_9'] . " 
Phone: " . $_POST['field_10'] . " 

"); 

include("confirm.html"); 

?> 

......

+0

В чем проблема? Какие ошибки вы получаете? Откуда берется вход? –

ответ

0

Вам необходимо установить заголовки:

  // To send HTML mail, the Content-type header must be set 
     $headers = "MIME-Version: 1.0\n"; 
     $headers .= "Content-Type: text/html; charset=ISO-8859-1\n"; 
     $headers .= "From: " . $from . "\n"; 
     $headers .= "Reply-To: ". $from . "\n"; 
     $headers .= "CC: [email protected]\n"; 

     // Mail it 
     mail($to, $subject, $message, $headers); 
+0

$ headers. = "От:". $ from. "\ П"; $ headers. = "Ответ на:". $ from. "\ П"; следует. $ From be field_9 –

+0

Да, это должно быть '$ _POST ['field_9']' –

+0

$ headers. = "От:". $ _POST ['field_9']. "\ П"; $ headers. = "Ответ на:". $ _POST ['field_9']. "\ П"; Что-то не так..и не получаю никаких сообщений –

Смежные вопросы