<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>
<td height="12"><div align="center"><?php echo $sumpage['conne'];?></div></td>
<td width="321" height="12"><div align="center"><?php echo "<img src=\"".$sumpage['TP']."\" hight=\"300\" width=\"262\" / >"; ?></div></td>
<td width="221" height="12"><div align="center" class="STYLE2"><a href="del.php?id=<?php echo $id ?>"></a>
<input name="Submit2" type="submit" class="bluebuttoncss" value="用点数查看名片" />
</div></td>
</tr>
<tr></tr>
</table>
</form>
<?php
$sd=1;
}
$id=$sumpage['id'];
if($num!=0)
{
if($page!=1)
{
"<a href=?page=1>首页</a>";
}else
{
"首页\t";
}
if($page>1)
{
"<a href=?page=".($page-1).">上一页</a>\t";
}else
{
"上一页\t";
}
if($page<$pages)
{
"<a href=?page=".($page+1).">下一页</a>\t";
}else
{
"下一页\t";
}
if($page!=$pages)
{
"<a href=?page=".$pages.">尾页</a>\t";
}else
{
"尾页\t";
}
}else{
"目前没有记录!!";
}
}?>
<?php echo $page ,$md?>
<table width="50%" border="0" align="center">
<tr>
<td width="10%"><div align="center"><?php echo "共".$pages."页" ?></div></td>
<td width="22%"><div align="center"><?php echo "<a href=?page=1&md={$_GET['key']}>首页</a>" ?></div></td>
<td width="17%"><div align="center">
<?php if($page>1){ echo "<a href=?page=".($page-1)."&md={$_GET['key']}>上一页</a>\t";}else{echo "上一页\t";}?>
</div></td>
<td width="19%"><div align="center">
<?php if($page<$pages){ echo "<a href=?page=".($page+1)."&md={$_GET['key']}>下一页</a>\t";}else{echo "下一页\t";}?>
</div></td>
<td width="16%"><div align="center">
<?php if($page!=$pages){ echo "<a href=?page=".$pages."&md={$_GET['key']}>尾页</a>\t";}else{echo "尾页\t";}?>
</div></td>
<td width="16%">共有<?php echo $num;if($num==""){ echo "0";} ?>名片</td>
</tr>
</table>
提交一次在sousuoxianshi2.PHP中可以现实出来.点击下一页key传值过来的$md变量消失了... 赋值是中文..新手希望能说的详细点......
<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>
<td height="12"><div align="center"><?php echo $sumpage['conne'];?></div></td>
<td width="321" height="12"><div align="center"><?php echo "<img src=\"".$sumpage['TP']."\" hight=\"300\" width=\"262\" / >"; ?></div></td>
<td width="221" height="12"><div align="center" class="STYLE2"><a href="del.php?id=<?php echo $id ?>"></a>
<input name="Submit2" type="submit" class="bluebuttoncss" value="用点数查看名片" />
</div></td>
</tr>
<tr></tr>
</table>
</form>
<?php
$sd=1;
}
$id=$sumpage['id'];
if($num!=0)
{
if($page!=1)
{
"<a href=?page=1>首页</a>";
}else
{
"首页\t";
}
if($page>1)
{
"<a href=?page=".($page-1).">上一页</a>\t";
}else
{
"上一页\t";
}
if($page<$pages)
{
"<a href=?page=".($page+1).">下一页</a>\t";
}else
{
"下一页\t";
}
if($page!=$pages)
{
"<a href=?page=".$pages.">尾页</a>\t";
}else
{
"尾页\t";
}
}else{
"目前没有记录!!";
}
}?>
<?php echo $page ,$md?>
<table width="50%" border="0" align="center">
<tr>
<td width="10%"><div align="center"><?php echo "共".$pages."页" ?></div></td>
<td width="22%"><div align="center"><?php echo "<a href=?page=1&md={$_GET['key']}>首页</a>" ?></div></td>
<td width="17%"><div align="center">
<?php if($page>1){ echo "<a href=?page=".($page-1)."&md={$_GET['key']}>上一页</a>\t";}else{echo "上一页\t";}?>
</div></td>
<td width="19%"><div align="center">
<?php if($page<$pages){ echo "<a href=?page=".($page+1)."&md={$_GET['key']}>下一页</a>\t";}else{echo "下一页\t";}?>
</div></td>
<td width="16%"><div align="center">
<?php if($page!=$pages){ echo "<a href=?page=".$pages."&md={$_GET['key']}>尾页</a>\t";}else{echo "尾页\t";}?>
</div></td>
<td width="16%">共有<?php echo $num;if($num==""){ echo "0";} ?>名片</td>
</tr>
</table>
提交一次在sousuoxianshi2.PHP中可以现实出来.点击下一页key传值过来的$md变量消失了... 赋值是中文..新手希望能说的详细点......
你的 url 变量是 $_GET['md'] 而不是 $_GET['key']
没有 key 哪来的 $_GET['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="STYLE4">(搜索名片中相关分类 如:家政,房地产等)</span></td>
</tr>
</table> </form>
<p> </p>
<p> </p>
<p> </p>
</div>
<script language="JavaScript" type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<script language="JavaScript" type="text/javascript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v;
event.clientY <310 ? obj.pixelTop=document.body.scrollTop+event.clientY :obj.pixelTop=document.body.scrollTop+event.clientY -310;
}
}/--></script>
<div style="position:absolute; visibility: hidden;" id="balloon"></div>
<div id="div" style="z-index:1">
<div id="ZHANSHI2">
<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>
<td height="12"><div align="center"><?php echo $sumpage['conne'];?></div></td>
<td width="321" height="12"><div align="center"><?php echo "<img src=\"".$sumpage['TP']."\" hight=\"300\" width=\"262\" / >"; ?></div></td>
<td width="221" height="12"><div align="center" class="STYLE2"><a href="del.php?id=<?php echo $id ?>"></a>
<input name="Submit2" type="submit" class="bluebuttoncss" value="用点数查看名片" />
</div></td>
</tr>
<tr></tr>
</table>
</form>
<?php
$sd=1;
}
$id=$sumpage['id'];
if($num!=0)
{
if($page!=1)
{
"<a href=?page=1>首页</a>";
}else
{
"首页\t";
}
if($page>1)
{
"<a href=?page=".($page-1).">上一页</a>\t";
}else
{
"上一页\t";
}
if($page<$pages)
{
"<a href=?page=".($page+1).">下一页</a>\t";
}else
{
"下一页\t";
}
if($page!=$pages)
{
"<a href=?page=".$pages.">尾页</a>\t";
}else
{
"尾页\t";
}
}else{
"目前没有记录!!";
}
}?>
<?php echo $page ,$md?>
<table width="50%" border="0" align="center">
<tr>
<td width="10%"><div align="center"><?php echo "共".$pages."页" ?></div></td>
<td width="22%"><div align="center"><?php echo "<a href=?page=1&md={$_GET['key']}>首页</a>" ?></div></td>
<td width="17%"><div align="center">
<?php if($page>1){ echo "<a href=?page=".($page-1)."&md={$_GET['key']}>上一页</a>\t";}else{echo "上一页\t";}?>
</div></td>
<td width="19%"><div align="center">
<?php if($page<$pages){ echo "<a href=?page=".($page+1)."&md={$_GET['key']}>下一页</a>\t";}else{echo "下一页\t";}?>
</div></td>
<td width="16%"><div align="center">
<?php if($page!=$pages){ echo "<a href=?page=".$pages."&md={$_GET['key']}>尾页</a>\t";}else{echo "尾页\t";}?>
</div></td>
<td width="16%">共有<?php echo $num;if($num==""){ echo "0";} ?>名片</td>
</tr>
</table>
加入一个输入框.........key同样分页没有值.................
形如 echo "<a href=?page=".($page-1)."&key=$md> 这样的