Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.