<?php
header('Content-Type: text/html; charset=gbk');
$currentPage = $_GET["currentPage"];
if($currentPage == NULL)
{
$currentPage = 1;
}
?>
<?php
include_once("date/db.php");
$db=new db();
$sqlNew="select * from newtypecf_hz where typeid='$_GET[id]'";//echo $sqlNew;
$rs=$db->query($sqlNew);
$num=$db->rows($rs);
//echo $num;
$pageSize = 1;//
$currentRow = ($currentPage-1)*$pageSize;//
$totalpage=$num/$pageSize;
@mysql_data_seek($rs,$currentRow);//
for($i=0;$i<$pageSize && $row=$db->fetch($rs);$i++)
{
?><div class="ul2_2hd">
<table width="835" height="884" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="841"><img src="../CMS/admin/cf_huizhang/cfimg/<?php echo $row["lv"];?>" width="851" height="841" /></td>
</tr>
<tr>
<td height="43" align="center" valign="middle"><table width="755" height="28" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="475" height="28" align="left"><a href="http://<?php echo $row["weburl"];?>"><img src="im/pic_54.gif" width="129" height="28" border="0" /></a></td>
</tr>
</table></td>
</tr>
</table>
</div>
<?php
}
?><table align="center">
<?php if($currentPage>1)
{
?>
<tr ><td width="83" height="23"><a href="qytest.php?currentPage=<?php echo $currentPage-1 ?>">上一页</a></td>
<?php
}
else
{
?>
<td width="131">上一页</td><?php
}
?><?php if($currentPage<$totalpage)
{
?>
<td height="23"> <a href="qytest.php?currentPage=<?php echo $currentPage+1 ?>">下一页</a></td>
<?php
}
else
{
?>
<td>下一页 </td></tr>
<?php
}
?></table></div>为什么当我点击下一页的时候什么值都没有 在次点击上一页的话也没有了值呢
header('Content-Type: text/html; charset=gbk');
$currentPage = $_GET["currentPage"];
if($currentPage == NULL)
{
$currentPage = 1;
}
?>
<?php
include_once("date/db.php");
$db=new db();
$sqlNew="select * from newtypecf_hz where typeid='$_GET[id]'";//echo $sqlNew;
$rs=$db->query($sqlNew);
$num=$db->rows($rs);
//echo $num;
$pageSize = 1;//
$currentRow = ($currentPage-1)*$pageSize;//
$totalpage=$num/$pageSize;
@mysql_data_seek($rs,$currentRow);//
for($i=0;$i<$pageSize && $row=$db->fetch($rs);$i++)
{
?><div class="ul2_2hd">
<table width="835" height="884" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="841"><img src="../CMS/admin/cf_huizhang/cfimg/<?php echo $row["lv"];?>" width="851" height="841" /></td>
</tr>
<tr>
<td height="43" align="center" valign="middle"><table width="755" height="28" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="475" height="28" align="left"><a href="http://<?php echo $row["weburl"];?>"><img src="im/pic_54.gif" width="129" height="28" border="0" /></a></td>
</tr>
</table></td>
</tr>
</table>
</div>
<?php
}
?><table align="center">
<?php if($currentPage>1)
{
?>
<tr ><td width="83" height="23"><a href="qytest.php?currentPage=<?php echo $currentPage-1 ?>">上一页</a></td>
<?php
}
else
{
?>
<td width="131">上一页</td><?php
}
?><?php if($currentPage<$totalpage)
{
?>
<td height="23"> <a href="qytest.php?currentPage=<?php echo $currentPage+1 ?>">下一页</a></td>
<?php
}
else
{
?>
<td>下一页 </td></tr>
<?php
}
?></table></div>为什么当我点击下一页的时候什么值都没有 在次点击上一页的话也没有了值呢
<a href="cwfuz.php?id=<?php echo $row["typeid"];?>" class="STYLE26"><?php echo $row["typetitle"];?></a>
这句中的$_GET['id']值是多少?好像没有看到有$_GET['id']值啊。
但是又有点问题 是这样的 那个ID 有的可以得到 有的确得到不
在一个页面里下一页的ID可以得到,但是上一页的ID就得不到了
但是在别的页面上 不管是上一页还是下一页 都可以得到
<a href="qytest.php?id=<?php echo $row["typeid"];?>¤tPage=<?php echo $currentPage-1 ?>">上一页</a>