Io ho un semplice form email che in locale funziona perfettamente mentre se lo metto online mi da questo errore:
Errore CGI
L'applicazione CGI specificata non ha restituito un insieme completo di intestazioni HTTP.
Cosa significa? non capisco....
ecco il codice della pagina del form:
Codice PHP:
<?php include('include/header.php');?>
<td>
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td>
<div class="boxtitle_center">
Form di Contatto
</div>
<div class="box_singolo">
<?php
if ($_POST['Invia']){
// L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
$to = "xxxxxxx@xxxxx.xxx";
// IL SOGGETTO DELLA MAIL
$subject = "CONTATTI DAL SITO: ".trim(stripslashes($_POST['nome']))." ".trim(stripslashes($_POST['cognome']))." - ".trim(stripslashes($_POST['azienda']));
// COSTRUIAMO IL CORPO DEL MESSAGGIO
$body = "Contenuto del modulo:\n\n";
$body .= "Nome e Cognome: " . trim(stripslashes($_POST['nome']))." ".trim(stripslashes($_POST['cognome'])) . "\n";
$body .= "Azienda: " . trim(stripslashes($_POST['azienda'])) . "\n";
$body .= "Indirizzo: " . trim(stripslashes($_POST['indirizzo'])) . "\n";
$body .= "Telefono: " . trim(stripslashes($_POST['telefono'])) . "\n";
$body .= "Attività: " . trim(stripslashes($_POST['attivita'])) . "\n";
$body .= "E-mail: " . trim(stripslashes($_POST['email'])) . "(per rispondere al cliente inviare una mail a questo indirizzo)\n";
$body .= "Note:\n" . trim(stripslashes($_POST['note']));
// INTESTAZIONI SUPPLEMENTARI
$headers = "CONTATTI DAL SITO";
// INVIO DELLA MAIL
if(@mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE...
echo "<center>Grazie per averci contattato! Riceverai una risposta il più presto possibile</center>";
} else {// ALTRIMENTI...
echo "Si sono verificati dei problemi nell'invio della mail. Vi preghiamo di riprovare.
";
echo "<a href=\"javascript:history.go(-1)\"><-- Torna indietro <--</a>[/b]";
}
}
else {
?>
<form method="post" action="contatti.php">
<table>
<tr>
<td>
[b]Nome[/b]</td>
<td>
<input name="nome" id="nome" size="20" style="width: 600px;" type="text"></td>
</tr>
<tr>
<td>[b]Cognome[/b]</td>
<td><input name="cognome" id="cognome" size="20" style="width: 600px;" type="text"></td>
</tr>
<tr>
<td>[b]Azienda[/b]</td>
<td><input name="azienda" id="azienda" size="20" style="width: 600px;" type="text"></td>
</tr>
<tr>
<td>[b]Indirizzo[/b]</td>
<td><input name="indirizzo" id="indirizzo" size="20" style="width: 600px;" type="text"></td>
</tr>
<tr>
<td>[b]Telefono[/b]</td>
<td><input name="telefono" id="telefono" size="20" style="width: 600px;" type="text"></td>
</tr>
<tr>
<td>[b]E-mail[/b]</td>
<td><input name="email" id="email" size="20" style="width: 600px;" type="text"></td>
</tr>
<tr>
<td>
[b]Note[/b]</td>
<td>
<textarea name="note" cols="20" rows="3" wrap="virtual" id="note" style="width: 600px; height: 150px;"></textarea></td>
</tr>
<tr>
<td></td>
<td>
<input name="Invia" value="Invia" type="submit"></td>
</tr>
<tr>
<td></td>
<td>
Inviando il presente modulo dichiaro di aver letto l'informativa sul trattamento dei dati personali.
[url="#"]Clicca per leggere l'informativa[/url]
</td>
</tr>
</table>
<?php } ?>
</form>
</div>
</td></tr>
</table>
</td></tr>
</table>
<?php include('include/footer.php')?>