Jump to content

*SOLVED* Simple while and table question


matthew798

Recommended Posts

<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]

Link to comment
https://forums.phpfreaks.com/topic/232712-solved-simple-while-and-table-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.