gpt4 book ai didi

php - 只有一个盒子而不是两个

转载 作者:行者123 更新时间:2023-11-29 05:18:00 24 4
gpt4 key购买 nike

我在我的 mysql 中有 2 行用于在我的站点中显示两个框

enter image description here

但是在我的网站上我只看到一个框而不是两个框:

enter image description here

我不知道出了什么问题.. 为什么不显示我的网站 2 个框

这是我的全部代码:

<?php
$shop = mysql_query("SELECT * FROM `shop` ORDER BY `id` ASC");
for($j=1; $shop = mysql_fetch_object($shop); $j++)
{

?>
<div class="buy_boxs">
<table width="100%">
<tr style="height:40px">


<div id="title-premium-boxs"><font color="#0a0e3e"><?=$shop->name?> </font></div>

<div class="gray-area">24-72 hour delivery</div>
<ul class="special" style="margin: 10px 22px 10px 40px">



<li>
<strong><?=$shop->nr1?></strong>
<?=$shop->media?>
<span class="away">$<?=$shop->price1?></span>
</li>
<li>
<strong><?=$shop->nr2?></strong>
<?=$shop->media?>
<span class="away">$<?=$shop->price2?></span>
</li>
<li>
<strong><?=$shop->nr3?></strong>
<?=$shop->media?>
<span class="away">$<?=$shop->price3?></span>
</li>
<li>
<strong><?=$shop->nr4?></strong>
<?=$shop->media?>
<span class="away">$<?=$shop->price4?></span>
</li>
<li>
<strong><?=$shop->nr5?></strong>
<?=$shop->media?>
<span class="away">$<?=$shop->price5?></span>
</li>
</ul></a>


<select class="selection" name="item_number" style="margin: 10px 22px 10px 25px; width: 201px">
<option data-price="15" value="TF1000"> <?=$shop->nr1?> <?=$shop->media?> — $<?=$shop->price1?> </option>
<option data-price="20" value="TF5000"> <?=$shop->nr3?> <?=$shop->media?> — $<?=$shop->price2?> </option>
<option data-price="30" value="TF10000"> <?=$shop->nr3?> <?=$shop->media?> — $<?=$shop->price3?> </option>
<option data-price="75" value="TF50000"> <?=$shop->nr4?> <?=$shop->media?> — $<?=$shop->price4?> </option>
<option data-price="150" value="TF100000"> <?=$shop->nr5?> <?=$shop->media?> — $<?=$shop->price5?> </option>
</select>
<div class="gray-area extrapadding">
<input style="margin: -14px 23px 10px 25px; width: 188px;" type="text" placeholder="<?=$shop->placeholder?>" name="custom">
</div>


<div style="text-align:right">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" id="business" value="">
<input type="hidden" name="item_name" value="<? echo $site->site_brand;?> <? echo $pack->name;?>">
<input type="hidden" name="item_number" value="<? echo $pack->coins;?>+ Credits">
<input type="hidden" name="custom" value="<? echo $data->id; ?>">
<input type="hidden" name="amount" value="<? echo $pack->price;?>">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="return" value="<?echo $site->site_url;?>">
<input type="hidden" name="cancel_return" value="<?echo $site->site_url;?>">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHosted">
<input type="hidden" name="notify_url" value="<?echo $site->site_url;?>/ipn.php">

</form>


</div>

</td>

</tr>
<input style="width: 151px;border: 1px solid #b6b6b6; margin: 10px 22px 10px 25px; width: 201px" type="submit" name="submit" onclick="addbanner();" value="Buy Now" class="button" />
</table>

</div>
<?}?>

</td></tr></table>

<br clear="all">
<br>
<b><?=$lang['sp85']?></b><br>
<br>
<span style="font-size: 10pt;font-family: Arial;"><?=$lang['sp86']?></span>
<?

感谢您的帮助!

最佳答案

由于您修复了 <?}?> ,

你应该为查询结果和获取结果使用不同的变量名:

$queryRes = mysql_query("SELECT * FROM `shop` ORDER BY `id` ASC");
for($j=1; $shop = mysql_fetch_object($queryRes); $j++) {

关于php - 只有一个盒子而不是两个,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30013243/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com