I inserted those lines in the script below (this script is for reading from db and display the content in a table) but it's not deleting anithing from my table, why? If I'm starting phpMyadmin in timestamp column I see the value 1035707348 for 27.10.2002 I realy don't understand that :?
<?
require ("db.inc.php");
//here are you're lines
$current_timestamp = time();
$limit_timestamp = $current_timestamp - (7 * 60 * 60 * 24);
mysql_query('DELETE FROM general where timestamp < '. $limit_timestamp);
//and from here i display all the fields from table general
$result = mysql_query ("SELECT * FROM general order by timestamp desc");
while ($data = mysql_fetch_array ($result))
{
?>
<table class="button" cellspacing="0" cellpadding="0" width="415"><tr><td class="linksmall">
<b> <? echo $data["title"]; ?></b> - <b><? echo $data["nume"]; ?></b> - <b>Tel</b> : <? echo $data["tel"]; ?> - [<? echo date("d. m. Y", $data["timestamp"]) ?>]</td></tr>
Here is the script that write's data to the db:
<?php
require('db.inc.php');
if($action=="submit")
{
$query = "INSERT INTO `$categorie` ( `id` , `title` , `nume` , `descriere` , `email` , `site`, `tel`,`timestamp` ) VALUES ('', '$title', '$nume', '$descriere', '$email', '$site', '$tel',".time().")";
mysql_query($query) or
die (mysql_error());
}
echo "You're post has been stored in db.";
?>
Pls give me some help with this thing.
10x