matthew798 Posted April 5, 2011 Share Posted April 5, 2011 <html> <head></head> <body> <img src="../images/form_logo.png"></img><br><br><br> <p>Thank you for chosing Orion Design MTL!<br> You can contact us at any time at </p> <br><br> <form id="list" action="form_calc.php" method="post"> <table width="100%" style="border:1px #000000 solid"> <tr><td> <select> <?php session_start(); include '../dbconnect_form_fields.php'; $res = mysql_query("SELECT * FROM form_fields") or die(mysql_error()); while($row = mysql_fetch_assoc($res)){ echo "<option value='".$row['id']."'>".$row['field']." ".$row['price']."</option>"; } echo "</select> </td></tr> <tr><td><select>"; while($row = mysql_fetch_assoc($res)){ echo "<option value='".$row['id']."'>".$row['field']." ".$row['price']."</option>"; } echo "</select>"; ?> </select> </td></tr></table> </form> </body></html> http://oriondesignmtl.com/forms/form1.php Check out the code, then check out the site... Why is it doing that!? The second dropdown menu is not drawing any values and it seems like the table is messing up as well... Any ideas?[/code] Quote Link to comment https://forums.phpfreaks.com/topic/232712-solved-simple-while-and-table-question/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.