I'm getting this error:
Parse error: syntax error, unexpected T_VARIABLE in /web/htdocs/www.immobiliare-deamicis.com/home/mail_segnala.php on line 1
I don't understand, any modify I made (even if I write 'print "hello";') it returns me this error.
thank you
<?php
$ipaddress=$_SERVER; //IP remote
// $_GET var
$lang=$_GET;
if (!$lang) $lang="it";
// $_POST var
$form_email = stripslashes ($_POST);
$type = stripslashes ($_POST);
$form_riferimenti = stripslashes ($_POST);
$form_accessori = stripslashes ($_POST);
$form_zona=$_POST;
$form_stato = stripslashes ($_POST);
$form_regione = stripslashes ($_POST);
$form_provincia = stripslashes ($_POST);
$form_localita = stripslashes ($_POST);
$form_contratto = stripslashes ($_POST);
$form_tipologia = stripslashes ($_POST);
$form_vani = stripslashes ($_POST);
$form_prezzo_min = stripslashes ($_POST);
$form_prezzo_max = stripslashes ($_POST);
// Verifica campi obbligatori
if (!isset($form_email) && $form_email == "") {
header("Location: trova.php?lang=$lang");
exit;
}
// Include in lingua
$err=@include ("gestione/bin/definizioni_$lang.php");
if (!$err) header("Location: " . $_SERVER);
include ("gestione/bin/inc_config.php");
include ("gestione/bin/inc_db.php");
dbconnect($conn, $conn, $conn, $conn);
$contratto_descrizione=explode(",", $LNG_contratti);
$destinatari=$form_email;
$oggetto=$LNG_segnala . " - Agenzia Immobiliare De Amicis - Bordighera";
$messaggio = ' here a long string for the messagge ';
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = "smtp.server.it"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "userr"; // SMTP username
$mail->Password = "pwd"; // SMTP password
$mail->From = "from Address";
$mail->FromName = "Immobiliare De Amicis";
$mail->AddAddress($destinatari);
$mail->WordWrap = 50; // set word wrap
$mail->IsHTML(true); // send as HTML
$mail->Subject = $oggetto;
$mail->Body = $messaggio;
//$mail->AltBody = "This is the text-only body";
if(!$mail->Send())
{
echo "Message was not sent <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
header("Location: /index.php?lang=$lang");
exit;
?>