Hello Daniel,

Friday, July 13, 2007, 5:50:53 PM, you wrote:

>     In your code, all you have is this:

Unfortunately it doesn't work, probably because of my lack of php
skills :-) I copied and paste your solution as follows:

<?

// Your email address
$youremail = 'mail adres';
// Your web site title
$websitetitle = 'John Doe's Site';
// Path to "thanks for the message" page
$thankyoupage = '................./Contact_success1.php';
// Send notification to sender (use false if not required)
$sendnotification = true;
    $subjectline = "Orçamento de empresa";
    $body =<<<EOB
Empresa: $_POST['empresa_name']
Contato: $_POST['contato_name']
Fone: $_POST['fone']
Fax: $_POST['fax']
Email: $_POST['email']
Produto: $_POST['produto']
Origem: $_POST['origem']
Destino: $_POST['destino']
Quantidade: $_POST['quantidade']
Peso: $_POST['peso']
Comprimento: $_POST['comprimento']
Altura: $_POST['altura']
Largura: $_POST['largura']
EOB;

   
  $from = "[EMAIL PROTECTED]";
    $headers  = "From: ".$from."\r\n";
    $headers .= "X-Mailer: Dan Brown, pilotpig.net\r\n";

    mail($youremail,$subjectline,$body,$headers);  

    // Continue with your error checking, output of form, et cetera.


$contact_form_action = $_SERVER['PHP_SELF'];
if ((isset($_POST["sendcontact"])) && ($_POST["sendcontact"] == "contactsent")) 
{
        $contacter_form_error = array();
        if (empty($_POST['empresa_name'])){
                $contacter_form_error[] = 'favor preencher nome da empresa';
        }
        if (empty($_POST['contato_name'])){
                $contacter_form_error[] = 'favor preencher nome do contato';
        }
        if (empty($_POST['fone'])){
                $contacter_form_error[] = 'favor preencher nĂºmero do telefone';
        }
        if (empty($_POST['contato_email'])){
                $contacter_form_error[] = 'favor preencher seu e-mail';
        }
        if (empty($_POST['produto'])){
                $contacter_form_error[] = 'favor preencher o produto';
        }
        if (empty($_POST['origem'])){
                $contacter_form_error[] = 'favor preencher origem';
        }
        if (empty($_POST['destino'])){
                $contacter_form_error[] = 'favor preencher destino';
        }
        if (empty($_POST['quantidade'])){
                $contacter_form_error[] = 'favor preencher quantidade';
        }
        if (empty($_POST['peso'])){
                $contacter_form_error[] = 'favor preencher peso';
        }
        if (empty($_POST['comprimento'])){
                $contacter_form_error[] = 'favor preencher comprimento';
        }
        if (empty($_POST['altura'])){
                $contacter_form_error[] = 'favor preencher altura';
        }
        if (empty($_POST['largura'])){
                $contacter_form_error[] = 'favor preencher largura';
        }
        else {
                $empresa_name = stripslashes($_POST['empresa_name']);
                $contato_email = stripslashes($_POST['contato_email']);
                
                $subjectline = "$websitetitle | Mensagem de $empresa_name";
                                
                
                if($sendnotification == true) {
                        $notification_message = "Obrigado por nos contatar, 
$contato_name. Recebemos sua mensagem e entraremos em contato em breve";
                        $notification_subject = "Obrigado por sua mensagem para 
$websitetitle.";
                        mail($contato_email, $notification_subject, 
$notification_message, "From: $youremail");
                }
                header("Location:$thankyoupage");
        }
}
?>

which gives the following error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE,
expecting T_STRING or T_VARIABLE or T_NUM_STRING in /................ on line 14

-- 
Best regards,
 Luc

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to