Forums
This topic is locked
passing dynamic list
Posted 13 Dec 2006 19:28:39
1
has voted
13 Dec 2006 19:28:39 Max Newbie posted:
I have a form where the list is populated from the database, but when I go to pass on the selection it passes the top of the list instead of the selected option. I am using dreamweaver 8, php 4.2.3 and mysql. (clients php) I have tried several things. I have used $SKU=<%rsSKU.Fields.Item("SKU".Value)%>Last attempt:<form id="updateProduct" name="updateProduct" method="post" action="updateProducts.php?SKU=<?php echo $row_rsSKU['SKU']?> ">
<div align="center">
<p>Product SKU
<select name="select">
<?php
do {
?>
<option label="skuNu" value="<?php echo $row_rsSKU['SKU']?>"><?php echo $row_rsSKU['SKU']?></option>
<?php
} while ($row_rsSKU = mysql_fetch_assoc($rsSKU));
$rows = mysql_num_rows($rsSKU);
if($rows > 0) {
mysql_data_seek($rsSKU, 0);
$row_rsSKU = mysql_fetch_assoc($rsSKU);
$passSKU = $row_rsSKU;
}
?>
</select>
</p>
<p><a href="updateProducts.php?SKU=<?php echo $row_rsSKU['SKU']; ?>">Edit this product </a></p>
<input type="submit" name="Submit3" value="Submit" />
</div>
<div align="center"> </div>
</form>