Hai ragione, è un buon consiglio... ma la query sta in una libreria di registrazione e non in quello della conferma dove stampo a video il risultato... Come faccio a stamparmi la query da lì?
config.php
Codice PHP:
$_CONFIG['regexpire'] = 24; //in ore
reg.lib
Codice PHP:
function reg_clean_expired(){
global $_CONFIG;
$query = mysql_query("
DELETE FROM ".$_CONFIG['table_utenti']."
WHERE (regdate + ".($_CONFIG['regexpire'] * 60 * 60).") <= ".time()." and temp='1'");
}
confirm
Codice PHP:
if(isset($_GET['id']) and strlen($_GET['id']) == 32){
reg_clean_expired();
$status = reg_confirm($_GET['id']);
switch($status){
case REG_SUCCESS:
$msg = "La tua registrazione è stata confermata; ora puoi effettuare il login.";
break;
case REG_FAILED:
$msg = "La registrazione non può essere confermata, probabilemente poichè è scaduta.";
break;
}