Ciao a tutti , avrei un piccolo problema con un form che ho aggiunto in un sito in .fla
in pratica ho fatto 2 file :
il 1° che si chiama contatti.php con all'interno il seguente codice
<form name="form1" method="post" action="mail.php">
<table width="95%" align="center" >
<tr>
<td colspan="2"><div align="center">MODULO CONTATTI </div></td>
</tr>
<tr>
<td width="16%">Nome</td>
<td width="84%"><input type="text" name="nome"></td>
</tr>
<tr>
<td>Cognome</td>
<td><input type="text" name="cognome"></td>
</tr>
<tr>
<td>Città </td>
<td><input type="text" name="citta"></td>
</tr>
<tr>
<td>Indirizzo E-mail </td>
<td><input type="text" name="mail"></td>
</tr>
<tr>
<td>Oggetto</td>
<td><input type="text" name="oggetto"></td>
</tr>
<tr>
<td>Testo</td>
<td><textarea name="testo" cols="40" rows="10"></textarea></td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="Invia">
</div></td>
</tr>
</table>
</form>
mentre nel 2° file sempre in php che si chiama mail.php c'è il seguente codice :
<?php
// L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
$to = "sitecostruction@live.it";
// IL SOGGETTO DELLA MAIL
$subject = "Modulo proveniente dal sito www.tis-consulting.com";
// COSTRUZIONE DEL CORPO DEL MESSAGGIO
$body = "Contenuto del modulo:\n\n";
$body .= "Dati personali ;
nome: " . trim(stripslashes($_POST["nome"])) . "\n";
$body .= "cognome: " . trim(stripslashes($_POST["cognome"])) . "\n";
$body .= "Città: " . trim(stripslashes($_POST["citta"])) . "\n";
$body .= "Oggetto: " . trim(stripslashes($_POST["oggetto"])) . "\n";
$body .= "testo: " . trim(stripslashes($_POST["testo"])) . "\n";
$body .= "mail: " . trim(stripslashes($_POST["mail"])) . "\n";
// INTESTAZIONI SUPPLEMENTARI
$headers = "From: Modulo utenti www.tis-consulting.com";
// INVIO DELLA MAIL
if(@mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE...
echo "La mail è stata inoltrata con successo.";
} else {// ALTRIMENTI...
echo "Si sono verificati dei problemi nell'invio della mail.";
}
?>
ma quando inserisco i dati per fare una prova dell'invio dell' email mi dice
Si sono verificati dei problemi nell'invio della mail e non capisco come mai , visto che sono 3 giorni che sto diventando pazzo ..... spero che possiate aiutarmi
grazie