Mail function problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sliver
Forum Newbie
Posts: 3
Joined: Wed Jul 02, 2008 12:04 pm

Mail function problem

Post by sliver »

hi all,

In my php source code it returns me this error...

"Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/a9370032/public_html/enviar_resposta.php on line 33"

this is line 33:

mail("jorge.alves@gmail.com", "Reserva de Transfer", $msg, $cabecalho);


and this is the all code....


<?php
session_start();
if ($_POST['vercode'] != $_SESSION['vercode'] OR $_SESSION['vercode']=="") {
//echo "<strong>Incorrect verification code.</strong><br>";
//echo "<a href="../form2.htm"></a>";
header("Location: http://transfers.site88.net/form.htm");
} else {
$msg = "Número de passageiros:\t$_POST[passengers]\n";
$msg .= "Destino:\t$_POST[local]\n";
$msg .= "Data da chegada:\t$_POST[date1]\n";
$msg .= "Hora de chegada:\t$_POST[time]\n";
$msg .= "Número do voo:\t$_POST[voo]\n";
$msg .= "Hotel (Morada):\t$_POST[address]\n";
$msg .= "Ida e volta?\t$_POST[way]\n";
$msg .= "Primeiro nome:\t$_POST[fname]\n";
$msg .= "Ultimo nome:\t$_POST[lname]\n";
$msg .= "Cidade:\t$_POST[city]\n";
$msg .= "Pais:\t$_POST[pais]\n";
$msg .= "Telefone fixo:\t$_POST[phone]\n";
$msg .= "Telemóvel:\t$_POST[mobile]\n";
$msg .= "E-mail:\t$_POST[email]\n";
$msg .= "Número de cadeiras de criança:\t$_POST[baby]\n";
$msg .= "Idades:\t$_POST[ages]\n\n";
// Usa dois caracteres de nova linha ao final do conteúdo,
// ou insere espaço adicionar

$cabecalho = "From: $_POST[email]\n";
$cabecalho .= "Reply-To: $_POST[email]\n\n";


mail("jorge.alves@gmail.com", "Reserva de Transfer", $msg, $cabecalho);

echo "<H1 ALIGN="CENTER">Thank you, $_POST[fname] $_POST[lname] for your reservation</H1>";
echo "<P ALIGN="CENTER">We are waiting for you at Faro Airport.</P>";
};
?>
Post Reply