The issue im having is when running a while loop inside of a while loop in php the html content after the second while loop is not being rendered
for a live demonstration http://naturalflame.altervista.org/home.php
I originally didnt use a continue after the second loop but then none of the other rows populate because it just stops after the second loop after adding the continue after the second loop the other rows populate but the description and action field are left out
<div id="main">
<h1>Product List</h1>
<table>
<tr>
<th>Size</th>
<th>Price</th>
<th>Flavor Selection</th>
<th>Flavor Description</th>
<th>Blend Selection</th>
<th>Action</th>
</tr>
<?
$sql="SELECT * FROM products ORDER BY price ASC";
$query=mysql_query($sql) or die(mysql_error());
while($row = mysql_fetch_object($query)){
$id = $row->id;
$size = $row->size;
$price = $row->price;
?>
<tr>
<td><? echo $size; ?></td>
<td>$<? echo $price; ?></td>
<td>
<select onchange="ChangeDescription(<? echo $id; ?>)" id="dSelection<? echo $id; ?>">
<option value="Select a flavor">Select a flavor</option>
<?
$sql2 = "SELECT * FROM flavors ORDER BY id ASC";
$query2 = mysql_query($sql2) or die(mysql_error());
while($row2 = mysql_fetch_object($query2)){
$name = $row2->name;
echo "
<option value='$name'>$name</option>
";
}
?>
</select>
</td>
<td id="description<? echo $id; ?>">Flavor Description</td>
<td><a href="home.php?page=products&action=add&id=<?php echo $row['id'] ?>&flavor=">Add to cart</a></td>
</tr>
<?}?>
</table>
</div><!--end main-->
This is in your source in the page. – Adam Forbis Dec 18 '17 at 18:47