Drop down menu
Posted: Thu Sep 20, 2007 8:19 am
feyd | Please use
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I got my drop down menu to populate from my database, now the problem I am having is...When the user selects from the drop down menu, I want that selection to be submitted so I can use it on another page. Here is the code i have so far. All it is right now is my drop down being populated from my database.Code: Select all
<form id="form1" name="form1" method="post" action="welcome.php">
<label>Location
<select name="select">
<?php
do {
?>
<option value="<?php echo $row_list['name']?>"><?php echo $row_list['name']?></option>
<?php
} while ($row_list = mysql_fetch_assoc($list));
$rows = mysql_num_rows($list);
if($rows > 0) {
mysql_data_seek($list, 0);
$row_list = mysql_fetch_assoc($list);
}
?>
</select>
</label>
</form>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]