首页上一页 1 下一页尾页 1 条记录 1/1页
谁知道这个变量是哪里获取的,有什么作用
发表在PHP图书答疑
2009-12-15
是否精华
是
否
版块置顶:
是
否
<?php
include("conn.php");
include("top.php");
?>
<table width="790" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><table width="550" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
<?php
$jdcz=$_POST[jdcz];
$name=$_POST[name];
$mh=$_POST[mh];
$dx=$_POST[dx];
if($dx=="1"){
$dx=">";
}
elseif($dx=="-1"){
$dx="<";
}
else{
$dx="=";
}
$jg=intval($_POST[jg]);
$lb=$_POST[lb];
if($jdcz!=""){
$sql=mysql_query("select * from tb_shangpin where mingcheng like '%".$name."%' order by addtime desc",$conn);
}
else
{
if($mh=="1"){
$sql=mysql_query("select * from tb_shangpin where huiyuanjia $dx".$jg." and typeid='".$lb."' and mingcheng like '%".$name."%'",$conn);
}
else{
$sql=mysql_query("select * from tb_shangpin where huiyuanjia $dx".$jg." and typeid='".$lb."' and mingcheng = '".$name."'",$conn);
}
}
$info=mysql_fetch_array($sql);
if($info==false){
echo "<script language='javascript'>alert('本站暂无类似产品!');history.go(-1);</script>";
}
else{
?>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#69BC2C">
<td width="92" height="25"><div align="center" style="color: #FFFFFF">名称</div></td>
<td width="83"><div align="center" style="color: #FFFFFF">品牌</div></td>
<td width="62"><div align="center" style="color: #FFFFFF">市场价</div></td>
<td width="62"><div align="center" style="color: #FFFFFF">会员价</div></td>
<td width="161"><div align="center" style="color: #FFFFFF">上市时间</div></td>
<td width="48"><div align="center" style="color: #FFFFFF"></div></td>
<td width="42"><div align="center" style="color: #FFFFFF">操作</div></td>
</tr>
<?php
do{
?>
<tr>
<td height="25"><div align="center"><?php echo $info[mingcheng];?></div></td>
<td height="25"><div align="center"><?php echo $info[pinpai];?></div></td>
<td height="25"><div align="center"><?php echo $info[shichangjia];?></div></td>
<td height="25"><div align="center"><?php echo $info[huiyuanjia];?></div></td>
<td height="25"><div align="center"><?php echo $info[addtime];?></div></td>
<td height="25"><div align="center"><a href="lookinfo.php?id=<?php echo $info[id];?>">查看</a></div></td>
<td height="25"><div align="center"><a href="addgouwuche.php?id=<?php echo $info[id];?>">购物</a></div></td>
</tr>
<?php
}while($info=mysql_fetch_array($sql));
}
?>
</table></td>
<td width="229" align="center" background="images/index_bg.gif"><?php include("right.php");?></td>
</tr>
</table>
<?php
include("bottom.php");
?>
就下面这段
$mh=$_POST[mh];
$dx=$_POST[dx];
if($dx=="1"){
$dx=">";
}
elseif($dx=="-1"){
$dx="<";
}
else{
$dx="=";
}
$jg=intval($_POST[jg]);
$lb=$_POST[lb];
if($jdcz!=""){
$sql=mysql_query("select * from tb_shangpin where mingcheng like '%".$name."%' order by addtime desc",$conn);
}
else
{
if($mh=="1"){
$sql=mysql_query("select * from tb_shangpin where huiyuanjia $dx".$jg." and typeid='".$lb."' and mingcheng like '%".$name."%'",$conn);
}
else{
$sql=mysql_query("select * from tb_shangpin where huiyuanjia $dx".$jg." and typeid='".$lb."' and mingcheng = '".$name."'",$conn);
}
}
$info=mysql_fetch_array($sql);
if($info==false){
echo "<script language='javascript'>alert('本站暂无类似产品!');history.go(-1);</script>";
}
else{
?>
include("conn.php");
include("top.php");
?>
<table width="790" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><table width="550" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
<?php
$jdcz=$_POST[jdcz];
$name=$_POST[name];
$mh=$_POST[mh];
$dx=$_POST[dx];
if($dx=="1"){
$dx=">";
}
elseif($dx=="-1"){
$dx="<";
}
else{
$dx="=";
}
$jg=intval($_POST[jg]);
$lb=$_POST[lb];
if($jdcz!=""){
$sql=mysql_query("select * from tb_shangpin where mingcheng like '%".$name."%' order by addtime desc",$conn);
}
else
{
if($mh=="1"){
$sql=mysql_query("select * from tb_shangpin where huiyuanjia $dx".$jg." and typeid='".$lb."' and mingcheng like '%".$name."%'",$conn);
}
else{
$sql=mysql_query("select * from tb_shangpin where huiyuanjia $dx".$jg." and typeid='".$lb."' and mingcheng = '".$name."'",$conn);
}
}
$info=mysql_fetch_array($sql);
if($info==false){
echo "<script language='javascript'>alert('本站暂无类似产品!');history.go(-1);</script>";
}
else{
?>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#69BC2C">
<td width="92" height="25"><div align="center" style="color: #FFFFFF">名称</div></td>
<td width="83"><div align="center" style="color: #FFFFFF">品牌</div></td>
<td width="62"><div align="center" style="color: #FFFFFF">市场价</div></td>
<td width="62"><div align="center" style="color: #FFFFFF">会员价</div></td>
<td width="161"><div align="center" style="color: #FFFFFF">上市时间</div></td>
<td width="48"><div align="center" style="color: #FFFFFF"></div></td>
<td width="42"><div align="center" style="color: #FFFFFF">操作</div></td>
</tr>
<?php
do{
?>
<tr>
<td height="25"><div align="center"><?php echo $info[mingcheng];?></div></td>
<td height="25"><div align="center"><?php echo $info[pinpai];?></div></td>
<td height="25"><div align="center"><?php echo $info[shichangjia];?></div></td>
<td height="25"><div align="center"><?php echo $info[huiyuanjia];?></div></td>
<td height="25"><div align="center"><?php echo $info[addtime];?></div></td>
<td height="25"><div align="center"><a href="lookinfo.php?id=<?php echo $info[id];?>">查看</a></div></td>
<td height="25"><div align="center"><a href="addgouwuche.php?id=<?php echo $info[id];?>">购物</a></div></td>
</tr>
<?php
}while($info=mysql_fetch_array($sql));
}
?>
</table></td>
<td width="229" align="center" background="images/index_bg.gif"><?php include("right.php");?></td>
</tr>
</table>
<?php
include("bottom.php");
?>
就下面这段
$mh=$_POST[mh];
$dx=$_POST[dx];
if($dx=="1"){
$dx=">";
}
elseif($dx=="-1"){
$dx="<";
}
else{
$dx="=";
}
$jg=intval($_POST[jg]);
$lb=$_POST[lb];
if($jdcz!=""){
$sql=mysql_query("select * from tb_shangpin where mingcheng like '%".$name."%' order by addtime desc",$conn);
}
else
{
if($mh=="1"){
$sql=mysql_query("select * from tb_shangpin where huiyuanjia $dx".$jg." and typeid='".$lb."' and mingcheng like '%".$name."%'",$conn);
}
else{
$sql=mysql_query("select * from tb_shangpin where huiyuanjia $dx".$jg." and typeid='".$lb."' and mingcheng = '".$name."'",$conn);
}
}
$info=mysql_fetch_array($sql);
if($info==false){
echo "<script language='javascript'>alert('本站暂无类似产品!');history.go(-1);</script>";
}
else{
?>