<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD">"http://www.w3.org/1999/xhtml">"Content-type"Content="text/html; Charset=utf-8"/><title> Untitled document </TITLE></HEAD><BR/><body><?php $name="";if(!empty ($_get["SS"]) {$name=$_get["SS"]; }?> <form action="fenye.php"Method="Get">Regional Enquiry<input type="text"Name="SS"Value="<?php echo $name;?>"/><input type="Submit"Value="Enquiry"/></FORM><BR/><table width="100%"Border="1"cellpadding="0"cellspacing="0"><tr> <td> Code </td> <td> Zone name </td> <td> parent code </td></tr><?PHP$TJ="1= 1";if(!empty ($_get["SS"]) && $_get["SS"]!="") {$TJ="areaname like '%{$_get[' ss ']}% '";} Include ("./lei.php/dbda.class.php"); $db=NewDbda (); Include ("./lei.php/page.class.php"); $szong="Select COUNT (*) from chinastates where {$TJ}"; $azong= $dbquery ($szong); $zongshu= $azong [0][0]; $page=NewPage ($zongshu, -); $AQL="SELECT * from Chinastates where {$TJ}". $pagelimit; $attr= $db->query ($AQL,1);foreach($attr as$v) {echo"<tr><td>{$v [0]}</td> <td>{$v [1]}</td> <td>{$v [2]}</td> <td>{$v [3]}</td> <td>{$v [4]}</td> </tr>"; }? ></table><?Phpecho $page-fpage ();?></body>Pagination--Conditional query and pagination