25/09/2008 18:38
Prova così:
Il codice era pieno di errori, non capisco come faceva a non uscirtene neanche uno.
Codice PHP:
<b>Clean Old Messages</b>
<br /><br />
<?php
if(isset($_POST['clean'])){
$data = date('Y-m-d H:i:s',time()+86400*30);
$sql = "DELETE FROM tb_messenger WHERE date>'".$data."'";
if(mysql_query($sql))
echo "<b>Done.</b><br /><br />";
else
echo mysql_error();
}
?>
This Button Will Clean Old Messages.
<br /><br />
<form method="post" action="">
<input type="hidden" name="clean" value="clean" />
<input type="submit" value="Clean" class="button" />
</form>
Il codice era pieno di errori, non capisco come faceva a non uscirtene neanche uno.
Mattia!