?? ?? ?? ??
1, ?? ??? ???
??:
<?php <a title="查看商品詳細(xì)信息" href="goodsshow.php?id=<?php echo $row["id"]?>"><?php echo $row["title"]?></a>
2, ???? ??? ??
? ???.php ??
<?php header("Content-type:text/html;charset=utf-8"); include "mysqli.php"; ?> <?php $id=isset($_GET["id"])?$_GET["id"]:1; $sql="update goods set hits=hits+1 where id=".$id; $mysqli->query($sql); $sql="select *from goods where id=".$id; $result=$mysqli->query($sql); while($row=$result->fetch_assoc()){ ?> <div> <span><?php echo $row["title"] ?></span> <hr> <image src="<?php echo $row["picurl"] ?>" width="200"></image> <br> 數(shù)量:-<input type="text" id="buynum" value="1">+ 價格: <del>市場價:<?php echo $row["marketprice"] ?></del> 出售價:<i style="color: red"><?php echo $row["salesprice"] ?></i> <input type="hidden" id="id" value="<?php echo $row["id"] ?>"> <hr> 內(nèi)容:<?php echo $row["content"] ?><br> <a href="javascript:;" onclick="">立刻購買</a> <a href="javascript:;" onclick="">加入購物車</a> <?php } ?> </div>
?? ??? ????? ????? ???? ?? ??? ?????? ?? ???? ?????. ???? ??? ???? ??? ??? ??? 1? ?????
$sql="update Goods set Hits=hits+1 where id=". $id;
3, ??? ??? ????: