diavolo che rapità... grazie.....
ecco il config.php
Codice PHP:
<html>
<head>
<title>Pannello di configurazione</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
/head>
<body>
<?
$page_form="mailer.php"; // Pagina contenente il form (Questa pagina deve stare nella stessa cartella contenente i files dello script)
$email_to="diegodjsen@gmail.com"; // Indirizzo del destinatario
$words="Messaggio inviato dal sito..." // Parole aggiuntive da inserire nell'email
?>
</body>
</html>
ed ecco il send.php
Codice PHP:
<html>
<head>
<title>Invio del messaggio</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
include("config.php");
$name=$_POST['name'];
$surname=$_POST['surname'];
$city=$_POST['city'];
$email=$_POST['email'];
$object=$_POST['object'];
$request=$_POST['request'];
if (($name == "") | ($object=="") | ($request==""))
{
echo "<center>Uno o più campi obbligatori non sono stati riempiti</center>
";
echo "<center>[b]<font size=\"2\">[url='javascript:history.back();']TORNA INDIETRO[/url]</font>[/b]</center>";
}
elseif (($email!="") & !(ereg("([[:alnum:]\.\-]+)(\@[[:alnum:]\.\-]+\.+)", $email)))
{
echo "<center>Hai inserito un indirizzo email in formato non valido</center>
";
echo "<center>[b]<font size=\"2\">[url='javascript:history.back();']TORNA INDIETRO[/url]</font>[/b]</center>";
}
else
{
if (!(empty($email)))
$from="From: $email\r\nReply-to: $email\r\n";
else
{
$email="diegodjsen@gmail.com";
$from="From: $email\r\nReply-to: $email\r\n";
}
$message=$words."\n\n";
$message.="Nome: ".$name."\n";
if (!(empty($surname)))
$message.="Cognome: ".$surname."\n";
if (!(empty($city)))
$message.="Città: ".$city."\n";
$message.="Richiesta: ".$request;
$message=stripslashes($message);
mail($email_to,$object,$message,$from);
echo "<center>Messaggio inviato
<a href=\"$page_form\">Vai al form</a></center>";
}
?>
</body>
</html>
????????????????