I have a dreamweaver8 form with a drop down menu that is populated with dynamic data from my database. The recordset (rs_findrecord) has two pieces of data, the id (value) and the domain name (option). The form population part is working fine. But once you select one of the records from the drop-down menu list that is created, and hit the submit button, it is suppose to pass the value parameter of the selected option on to the next page in the URL. Which it kind of does, except that it is only passing the value of the first option in the list (which value is 219) and not the value of the option that was selected.
This is the actual url that is being currently being passed but has the wrong value for the id parameter:
I need the value of the option selected to be passed. Everything else should work once I get that to send the right value. Thanks for any help you might offer.
----------------------------------
Here is the form's code that dreamweaver has made so far:
<form action="find_domain_results.php?id=<?php echo $row_rs_findrecord['id']; ?>" method="post" name="form2" target="_blank" id="form2">
<div align="left">
<p><strong>Select from this list:</strong>
<select name="select">
<option value="">-- Select Domain Name Below --</option>
<?php
do {
?>
<option value="<?php echo $row_rs_findrecord['id']?>"><?php echo $row_rs_findrecord['Domain Name']?></option>
<?php
} while ($row_rs_findrecord = mysql_fetch_assoc($rs_findrecord));
$rows = mysql_num_rows($rs_findrecord);
if($rows > 0) {
mysql_data_seek($rs_findrecord, 0);
$row_rs_findrecord = mysql_fetch_assoc($rs_findrecord);
}
?>
</select>
<input type="submit" name="Submit" value="Get It" />
</p>
</div>
</form>
This is the actual url that is being currently being passed but has the wrong value for the id parameter:
I need the value of the option selected to be passed. Everything else should work once I get that to send the right value. Thanks for any help you might offer.
----------------------------------
Here is the form's code that dreamweaver has made so far:
<form action="find_domain_results.php?id=<?php echo $row_rs_findrecord['id']; ?>" method="post" name="form2" target="_blank" id="form2">
<div align="left">
<p><strong>Select from this list:</strong>
<select name="select">
<option value="">-- Select Domain Name Below --</option>
<?php
do {
?>
<option value="<?php echo $row_rs_findrecord['id']?>"><?php echo $row_rs_findrecord['Domain Name']?></option>
<?php
} while ($row_rs_findrecord = mysql_fetch_assoc($rs_findrecord));
$rows = mysql_num_rows($rs_findrecord);
if($rows > 0) {
mysql_data_seek($rs_findrecord, 0);
$row_rs_findrecord = mysql_fetch_assoc($rs_findrecord);
}
?>
</select>
<input type="submit" name="Submit" value="Get It" />
</p>
</div>
</form>