I am trying to get a dropdown list populated by mysql to work for me. The list is populated from the database just fine, but isn’t passing it to the results page. Could someone have a look-see?
This part works fine. the dropdown is populated and looks ok but it doesn’t seem to be passing it to the next page.
[php]mysql_connect(‘localhost, ‘svcTools’, ‘’’’);
mysql_select_db(‘svcTools’);
$sql = “SELECT weight FROM cfm ORDER BY weight”;
$result = mysql_query($sql);
echo “
Pig Weight
”;
echo “”;
while ($row = mysql_fetch_array($result)) {
echo “<option value=’” . $row[‘weight’] . “’>” . $row[‘weight’] . “”;
}
echo “”;
?>[/php]
This part does not work.
[php]<?php
echo $_POST[‘weight’];
?>[/php]
this seems like it should be simple. thanks!