if($croom==0){
$sql = "SELECT id, status FROM rooms";
$result = mysql_query($sql);
while ($row=mysql_fetch_array($result))
{
$id=$row['id'];
$status=$row['status'];
}
$_SESSION["id"]=$id;
$timestamp = time();
$timeoutseconds = 400;
$timeout = $timestamp-$timeoutseconds;
$ifso='yes';
if($status='$ifso')
{
$sql ="DELETE FROM rooms WHERE timestamp<$timeout";
mysql_query($sql);
}
can someone please tell me why this peice of code doesnt work what it does is just delete the chat room right away rather than wait for the time limit first 🙁