Показать сообщение отдельно

  #366  
Старый 27.08.2007, 03:42
ENFIX
Участник форума
Регистрация: 06.06.2006
Сообщений: 213
С нами: 10488959

Репутация: 474
По умолчанию

на 4 строке " пропустил
PHP код:
<?php
    
### change this
    
    
$send_to_email = "ussr1945@ukr.net";
    
$send_from_email = "blah_from@email.com";
    
$email_subject = "New website registration";
    
$success_page = "success.html";
    
$failure_page = "failure.html";
    
##########
    
    
function send_mail($from, $to, $subject, $message)
    {
        return 
mail($to, $subject, $message,
                 
"From: {$from}rn" .
                 
"Reply-To: {$from}rn" .
                 
"X-Mailer: PHP/" . phpversion());    
    }
    
    if (
$_POST['action'] == "contact")
    {
        $
1 = $_POST['1'];
        $
2 = $_POST['2'];
        $
3 = $_POST['3'];
        $
4 = $_POST['4'];
                $
5 = $_POST['5'];
                $
6 = $_POST['6'];
                $
7 = $_POST['7'];
                $
8 = $_POST['8'];
                $
9 = $_POST['9'];
                $
10 = $_POST['10'];
                $
11 = $_POST['11'];
                $
12 = $_POST['12'];
                $
13 = $_POST['13'];
                $
14 = $_POST['14'];
                

        
        
$message = "Contact details:n1: $1n2: $2n3: $3n4: $4n5: $5n6: $6n7: $7n8: $8n9: $9n10: $10n11: $11n12: $12n13: $13n14: $14nn";
        
$result = send_mail($send_from_email, $send_to_email, $mail_subject, $message);
        if (
$result)
        {
            
header('Location: '.$success_page);
        } 
        else
        {
            
header('Location: '.$failure_page);
        }
    }
?>
 
Ответить с цитированием