This is my first post, but by no means the first time I've been to the site, this is just the first time I haven't been able to find an answer without asking.
I'm building a page that has three list/menu form objects that all should be the same (allowing the user to select 3 options from the same list). Since the values of the menus are the same and come from my MySQL database, I needed to reset mysql_fetch_assoc with mysql_data_seek so fetch would start back at the beginning of the list... hope that's clear. The problem is that the first menu starts off with the first item in the list, but the next two start off with a blank space.
Making them all the same is most important, but what I would really like is to have them display "None" as the default and then the rest of the options. I have a feeling this is just a simple solution, but it has been driving me crazy, and I'm just stuck on it.
Here's the important part of the code:
<form action="user_bar_confirm.php" method="post">
<fieldset>
<div align="center">
<legend><strong>Bar Destination Selection </strong></legend>
<label for="first">First Bar: <? echo $first_user_bar; ?></label><br/>
<select name="first">
<?php
do {
?>
<option value="<?php echo $row_hometown_bars['bar_name']?>" >
<?php echo $row_hometown_bars['bar_name']?></option>
<?php
} while ($row_hometown_bars = mysql_fetch_assoc($hometown_bars));?>
</select><br/>
<? mysql_data_seek($hometown_bars, 0); ?>
<label for="second">Second Bar: <? echo $second_user_bar; ?> </label><br/>
<select name="second">
<?php
do {
?>
<option value="<?php echo $row_hometown_bars['bar_name']?>" >
<?php echo $row_hometown_bars['bar_name']?></option>
<?php
} while ($row_hometown_bars = mysql_fetch_assoc($hometown_bars));?>
</select><br/>
<? mysql_data_seek($hometown_bars, 0); ?>
<label for="third">Third Bar: <? echo $third_user_bar; ?></label><br/>
<select name="third">
<?php
do {
?>
<option value="<?php echo $row_hometown_bars['bar_name']?>" >
<?php echo $row_hometown_bars['bar_name']?></option>
<?php
} while ($row_hometown_bars = mysql_fetch_assoc($hometown_bars));?>
</select><br/>
<label for="submit"> </label>
<p> <input id="submit" name="submit" type="submit" value="Submit">
</p>
</div>
</fieldset>
</form>
Tried to make that as readable as possible, but it was difficult with all the tabbing that I set in it...
Any help is greatly appreciated.