<?
if(!isset($start)){
$start = 0;
}
$limit = '5';
$Qtotal=mysql_query("SELECT * FROM tsportman ORDER BY smid desc ");
$total =mysql_num_rows($Qtotal);
if($_POST["de1"]!="")
{
print $start["smid"];
var_dump($page);
$_SESSION["z"]=$_POST["select1"];
$_SESSION["z1"]=$_POST["textfield"];
$_SESSION["z2"]=$_POST["de1"];
$sql11="SELECT * FROM tsportman
where depno = ".$_SESSION["z2"]." and ".$_SESSION["z"]." like '%".$_SESSION["z1"]."%' ORDER BY smid DESC LIMIT
$start,$limit";
$t=mysql_query($sql11);
print $rt==$t['smid'];
$sql="SELECT * FROM tsportman
where depno = ".$_SESSION["z2"]." and ".$_SESSION["z"]." like '%".$_SESSION["z1"]."%' ORDER BY smid DESC LIMIT $start,$limit";
}
else
{
var_dump($page);
$sql="SELECT * FROM tsportman ORDER BY smid DESC LIMIT $start,$limit";
}
$Query = mysql_query($sql);
$totalp = mysql_num_rows($Query);
while($r = mysql_fetch_array($Query))
{
$sql="SELECT * FROM tsportman
where depno = ".$_SESSION["z2"]." and ".$_SESSION["z"]." like '%".$_SESSION["z1"]."%' ORDER BY smid DESC LIMIT $start,$limit";