j3rmain3 Posted November 8, 2006 Share Posted November 8, 2006 I have created a table that contains links and dropdown menus. This is how i have set it up[code]while ($row=mysql_fetch_row($result) > 0){ echo "<tr>" echo "<td>".$row[filename]."</td>"; //---- I have done it like this so the table is automatically updated when new data has been added to the database-----// echo "<td><a href=http://www.mysite/$row[url]>$row[filename]"; echo "<select name=rating> <option value=1 name=$row[filename]tech>1 - Awful <option value=2 name=$row[filename]tech>2 - Poor <option value=3 name=$row[filename]tech>3 - Average <option value=4 name=$row[filename]tech>4 - Ok <option value=5 name=$row[filename]tech>5 - Excellent</td>"; echo "</select>";[/code]imagine $row[filename] is currently holding only three records which are "sega","nintendo","microsoft". i want the dropdown options to be named segatech, nintendotech, microsofttech which it does perfectly. But then i want the option to be moved from the form and to be displayed in the table. To do so, the header of the php which the is form is being processed to needs to have: $segatech = $_POST['segatech'];$nintendotech = $_POST['nintendotech'];$microsofttech = $_POST['microsofttech'];I want this to be built dynamically so whenever a new record was to appear it would then place itself at the bottom of the post section. for example if a new record with the name "sony" was to be added to the database, a new line would be added:$sonytech = $_POST['sonytech'];and this would be generated in the file.Is there a loop which i could create so this could be done dynamically or will i have to enter one in for each record.thanksj3rmain3 Quote Link to comment 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.