I am having trouble with Dreamweaver 8 and php with MySQL.
Basically, I have a main page, index.php that includes a header file that I use to display my header using readfile like this:
<?php readfile("header.php"); ?>
Inside of header.php, there is code to create a drop down list. I am trying to populate this list from my database, but I cannot get this to work.
This is the code snippet:
<form name="storeShowSelect" method="GET" class="sf_select" target='newwin'>
<input name="selectStore" type="hidden" value="17999">
<select name="storeSelect" onChange="jumpToLink(this);">
<option disabled selected >--- Select a store ---</option>
<?php
do {
?>
<option value="<?php echo $row_marketplaceStoreNames['storeName']; ?>">
<?php echo $row_marketplaceStoreNames['storeDisplayName']; ?>
</option>
<?php
} while ($row_marketplaceStoreNames = mysql_fetch_assoc($marketplaceStoreNames));
?>
</select>
</form>
It looks like this is only inserting one blank row in the drop down list. When testing my recordset in Dreamweaver, I do get the rows of data that I am expecting.
Can anyone possibly help me figure out what I am doing wrong here?
Thanks in advance,
Mona