<?
if($pr)
	{
	$r=mysql_query("SELECT * FROM mess WHERE ".$lok);
	$nr=mysql_num_rows($r);
	if($nr)
		{
		mysql_query("DELETE FROM mess WHERE ".$lok);
		echo "<HTML><HEAD><meta http-equiv='Refresh' charset='utf-8' content='0; URL=".$perr."'></HEAD></HTML>";
		exit();
		}
	}
?>