http://nemesisdesign.altervista.org/...e2/contact.php
Il modulo fino a pochi giorni fa funzionava, ora invece mi arriva una email senza le informazioni del form con solo le informazioni del mittente (indirizzo ip, browser ecc.).
Nella versione flash http://nemesisdesign.altervista.org/index2.php alla sezione contact, lo stesso tipo di script (ma non lo stesso file), funziona.
Lo script è:
Codice PHP:
$version = "v1.3";
function show($error, $message){
global $version;
unset($GLOBALS["version"]);
echo "<html>
<head>
<title>Contact</title>
</head>
<style>
body{background-color: #CCCCCC; font-family: verdana; font-size: 8pt; color: black;}
</style><body>";
echo "<table width=\"500\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\" bordercolor=\"#000000\">\n";
echo "<tr><td bgcolor=\"#CCCCCC\"><h5 align=\"center\"><font face=\"Verdana, Arial, Helvetica, sans-serif\">$error\n";
echo "</font></h5></td></tr><tr><td height=\"115\" bgcolor=\"#CCCCCC\">\n";
echo "<div align=\"center\"><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\">$message</font></div></td></tr><tr><td bgcolor=\"#CCCCCC\">\n";
echo "</body></html>";
}
if ($action == "send"){
// Date and Time
$time = date("F jS Y, h:iA");
// Grab the config file
require "configmail.inc.php";
// Do we need to log the IP addresses ?
if ($logip == "1"){
// Open the logfile
if (!file_exists($logipfile)){
$error = "Form Error (No Log File)";
$message = "<b>Warning</b> \"Log IP\" file does not exist - please make a text file named <b>$textname</b> and CHMOD it 777";
show($error, $message);
exit;
}
$fp = @fopen("$logipfile", "a");
if (!($fp)){
$error = "Form Error (CHMOD)";
$message = "<b>Warning</b> The \"Log IP\" file is not set CHMOD 777";
show($error, $message);
exit;
}
}
// Iterate through all the POST variables, add them to the message body:
$message = "";
// Start Iterate
while (list($key, $value) = each($HTTP_POST_VARS)){
$message .= $key . ': ' . $value . "\r\n";
}
// Add extra Info
$message .= "\n\n--------------- Informazioni sul mittente ---------------\n\n";
$message .= "(er php me lo so imparato pure io) \n";
$message .= "Inviato: $time"."\n";
// Grab the env config file
if ($envreport == "1"){
require "configenv.inc.php";
$message .= "Indirizzo IP: $ip"."\n";
$message .= "Browser: $browser";
}
if (!isset($recipient)){
$recipient = $whoto;
}
if (getenv("REQUEST_METHOD") == "GET"){
$error = "Form Error (Request Method)";
$message = "You may only use this script using the \"POST\" method from this domain<br><br>$HTTP_HOST";
show($error, $message);
exit;
}
else {
$checkpoint = ereg("@*$",$email);
if($checkpoint==0) {
// if no valid email address entered, display no email message
$error = "Form Error (Email)";
$message = "<b>Devi inserire un'indirizzo email valido.</b>.";
show($error, $message);
exit;
}
else {
mail("$recipient", "Site Contact", $message, "From: $email");
}
if ($logip == "1"){
fputs($fp, "$ip // $time // $email \n");
// close the textfile
fclose($fp);
}
if ($thankspage == "1"){
header("Location: $pagelocation");
}
else {
$error = "Invio riuscito.";
$message = $thanksmessage;
show($error, $message);
exit;
}
}
}
Sorry.
Help please