lukeurtnowski — 2010-12-27T01:10:59-05:00 — #1
On my site I have 2 combo boxes (1 to select a member to delete and another to select a member to edit). The Delete one uses a mysql culomn to populate it,\
<select name="id" id="name">
)<option value="0" selected>(please select:)</option>
<?php while($row = mysql_fetch_assoc($result))
echo "<option value=".$row['id'].">".$row['Last_Name'].", ".$row['First_Name']."</option>";
How do /I copy it so that the Edit one is populated like that one?
Do I have to query the database again or is there a better way"?
system — 2010-12-27T01:18:30-05:00 — #2
If you want to use the same query result set for both combo boxes, you can use mysql_data_seek before creating the second combo box.
donboe — 2010-12-27T02:15:52-05:00 — #3
Why not make just 1 select/combo box with member names and two radio buttons(1 for edit and 1 for delete), and depending which radio button chosen take the appropriate action!
lukeurtnowski — 2010-12-27T02:25:19-05:00 — #4