PHP分页赋值问题....大大帮助解决一下.在线等了给分附代码
<sousuoxianshi.PHP>
<div id="connent"><div id="sousuo"><form method="get" name="form1" target="_blank" id="form1" action="/MPY/ZML/sousuoxianshi2.php?md=<?php echo $key; ?>">
<table width="965" border="0">
<tr>
<td width="59%">
<div align="right">
<input name="key" type="text" class="bluebuttoncss" id="key" style="width:380px" size="12" />
</div></td>
<td width="9%"><input name="Submit" type="submit" class="bluebuttoncss" value="名片搜索" style="height:34px" /></td>
<td width="32%"><span class="STYLE3">(搜索名片中相关分类 如:家政,房地产等)</span></td>
</tr>
</table>
<?php
$conn=mysql_connect("localhost","root","toma123") or die("连接错误");
mysql_select_db("cs",$conn);
mysql_query("set names 'GBK'");
mysql_query("set characher set gb2312");
mysql_query("set names gb2312");
$key = $_GET['key'];
?>
<sousuoxianshi2.php>
<p>
<?php
$conn=mysql_connect("localhost","root","toma123") or die("连接错误");
mysql_select_db("cs",$conn);
mysql_query("set names 'GBK'");
mysql_query("set characher set gb2312");
mysql_query("set names gb2312");
$md=$_GET['key'];
if($md!=""){
$sql="select * from ud8 where title like '%$md%'";
$result=mysql_query($sql);
$sst=mysql_fetch_array($result);
$num=mysql_num_rows($result); //统计行数
$pages=ceil($num/8); //总页数
$page=$_GET['page']; //获得page,如果没有设置或者page=0,把$page=1;
if($page=="")
{
$page=1;
}
$start=($page-1)*8;
$sql="select * from ud8 where title like '%$md%' limit ".$start.",". 8;
$query=mysql_query($sql);
while($sumpage=mysql_fetch_array($query)){
$id=$sumpage['id'];
$dd=$id;
?>
<form id="form2" name="form2" method="post" action="/MPY/ZML/ck.php?dd=<?php echo $sumpage['id']?>">
<table width="965" height="30">
<tr>
<td width="161" height="11" bgcolor="#f0f0f0"><div align="center">公司名称</div></td>
<td width="242" height="11" bgcolor="#f0f0f0"><div align="center">业务介绍</div></td>
<td width="321" height="11" bgcolor="#f0f0f0"><div align="center">图片缩略图</div></td>
<td width="221" height="11" bgcolor="#f0f0f0"><div align="center">查看名片</div></td>
</tr>
<tr>
<td width="161" height="12"><div align="center"><?php echo $sumpage['title'];?></div></td&g