很抱歉出现这样一个 nOOb 问题,但我已经为此工作了一段时间,无法弄清楚如何闯入和退出 php - 特别是当它进入下面的 do while 循环时。请问有人帮忙吗?
if (!$_POST){
$display .= '<div class="aptitle">
<h2>Add Product</h2>
</div><!-- aptitle -->
<div class="apsubtitle">
<h3>Step 1 of 6</h3>
</div><!-- apsubtitle -->
<div class="selectcategorytitle">Please select a category for your item</div><!--selectcategorytitle-->
<div class="selectcategory">
<form action="addproducts2.php" method="post" enctype="multipart/form-data" name="step1">
<div class="selected">Category: <select name="category" class="addproductselect" value=" ' . $selectedcategory . ' " id="select">
<option value="0">Select a Category</option>
<?php do { ?>
<option value="<?php echo $categorylist['pk_cat_id'];?>">
<?php echo $categorylist['category']; ?> </option>
<?php } while ($categorylist = mysql_fetch_assoc($category_query)); ?>
</select>
<input name="submit" class="submitbtn" type="submit" value="Next Step" /></div><!--selected -->
</form>
</div><!--selectcategory-->';
}