salve ragazzi mi appare un errore quando linco il link di dove e il files cheserve ad inviare l email e a inserire i dati nel db l errore chemi esce e il seguente
cosa puo essere il problema ?
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in D:\Inetpub\vhosts\marikwebdesigner.com\httpdocs\x\ mess.PHP on line 56
posto lo script
Codice PHP:
<?php
include_once("include/config.php");
$adminaddress = "info@marikwebdesigner.com";
$siteaddress ="http://www.marikwebdesigner.com";
$sitename = "marikwebdesigner";
error_reporting ( E_WARNING | ~ E_NOTICE ) ;
$CONFIG['expire'] = 60;
$CONFIG['regexpire'] = 24; //in ore
$conn = @mysql_connect($CONFIG['host'], $CONFIG['user'], $CONFIG['pass']) or die("&error= Impossibile stabilire una connessione");
@mysql_select_db($CONFIG['dbname']) or die("&error= Errore nel DB");
$CONFIG['check_table'] = array(
"name" => "check_global",
"email" => "check_global"
);
function check_email($value)
{
global $CONFIG;
$value = trim($value);
if (($value == ""))
{
echo "&error= Il campo non può essere lasciato vuoto";
}
else{
$query = @mysql_query("SELECT id FROM mailing WHERE email='$value'")or die("&error= Errore nella query");
if (@mysql_num_rows($query) != 0) return "&mess= Email già utilizzata";
else return"OK";
}
}
//--------------
define('AUTH_LOGGED', 99);
define('AUTH_NOT_LOGGED', 100);
define('AUTH_USE_COOKIE', 101);
define('AUTH_USE_LINK', 103);
define('AUTH_INVALID_PARAMS', 104);
define('AUTH_LOGEDD_IN', 105);
define('AUTH_FAILED', 106);
define('REG_ERRORS', 107);
define('REG_SUCCESS', 108);
define('REG_FAILED', 109);
//No need to change anything below ...
// Gets the date and time from your server
$date = date('Y-m-d H:i:s');
// Gets the IP Address
if ($_SERVER['REMOTE_ADDR'] == "")
{
$ip = "no ip";
}
else
{
$ip = gethostbyaddr($_SERVER['REMOTE_ADDR']);
}
// Gets the POST Headers - the Flash variables
$action = $_REQUEST['action'] ;
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
//Process the form data!
// and send the information collected in the Flash form to Your nominated email address
if ($action == "send")
{
//Innanzitutto controlliamo la var.le name:
$controllo = check_email($email);
if ($controllo != "OK")
{
echo $controllo;
//Qui potresti anche far visualizzare una cosa del genere:
//echo "&mess=
<A HREF=\"http://www.marikweb.com/homeita/\">Ritorna alla registrazione</A>";
}
else
{
//Ora inseriamo i dati nel DB.
//Ovviamente devi creare una tabella in cui inserire i dati ke passi con il post.
$link_db = mysql_connect($CONFIG['host'],$CONFIG['user'],$CONFIG['pass']);
mysql_select_db($CONFIG['dbname']);
$sql_insert = "INSERT INTO mailing (name,email,date,ip) VALUES ('$name','$email','".date('Y-m-d H:i:s')."','".$_SERVER['REMOTE_ADDR']."')";
if (mysql_query($sql_insert))
{
echo "&mess= OK RIGA INSERITA ";
}
else
{
die(mysql_error());
}
mysql_close($link_db);
//A questo punto inviamo l'e-mail
mail ("$adminaddress","informazioni",
"L'utente: $name si è iscritto alla MailingList
------------------------------
Name Utente: $name
EmailUtente: $email \n
------------------------------
Logged Info :
------------------------------
Using: {$_SERVER['HTTP_USER_AGENT']}
Hostname: $ip
IP address: {$_SERVER['REMOTE_ADDR']}
Date/Time: $date","FROM:$email" ) ;
//This sends a confirmation to your visitor
mail ("$email","Re:",
"Salve $name,\n
Per confermare l'iscizione alla Newsletter Le basta cliccare sul link sottostante $siteaddress/homeita/mailinglist/conferma.php?email=$email&name=$name
Saluti dallo Staff di $sitename
$siteaddress","FROM:$adminaddress") ;
//Confirmation is sent back to the Flash form that the process is complete
$sendresult = "Thank you. You will receive a confirmation email shortly.";
$send_answer = "answer=";
$send_answer .= rawurlencode($sendresult);
echo $send_answer;
}
}//
?>