我的mysql中有两行用于在我的站点中显示
但在我的网站上,我只看到一个盒子而不是两个盒子:
我不知道怎么了。。为什么不显示我的网站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>
<?

谢谢你的帮助!

最佳答案

你用过

    </div>
<?}?>

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

替换为
<?php } ?>

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

10-11 04:33