first off, thanks to meekos for helping.
now i have an issue with this code. i think i am missing something obvious but i cannot see it. here is the form page:
<form action="action001.php" method="post">
<!-- price dropdown -->
<?php
require_once ('mysql_connect.php');
$query = "SELECT * FROM price ORDER BY priceband_id ASC";
$result = @mysql_query ($query);
$pulldown = '<option>Select One</option>';
while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) {
$pulldown .= "<option value=\"{$row['priceband_id']}\">{$row['priceband']}</option>\n";
}
?>
Price<select name="priceband">
<?php echo $pulldown; ?>
</select>
<!-- area dropdown -->
<?php
$query = "SELECT * FROM area ORDER BY area_id ASC";
$result = @mysql_query ($query);
$pulldown2 = '<option>Select One</option>';
while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) {
$pulldown2 .= "<option value=\"{$row['area_id']}\">{$row['area']}</option>\n";
}
?>
Area<select name="area">
<?php echo $pulldown2; ?>
</select>
<input type="submit" name="submit" value="submit" />
</form>
then the form handling page called 'action001.php'
<?php
require_once ('mysql_connect.php');
$sql = "SELECT price, priceband_id, area, area_id FROM stuff WHERE priceband_id=" . $_post['priceband_id'] . " AND area_id=" . $_post['area_id'] . "";
$query = mysql_query($sql);
while ($row = mysql_fetch_array($query)) {
echo "<p>{$row['price']} : {$row['area']}</p>";
}
?>
the form pulls two drop down lists correctly and the submit button calls the action001.php page correctly. however the page is blank. i want it to pull 'price' and 'area' from a table called 'stuff'. the id values in 'stuff' match the id values in the two tables used to generate the dropdowns. any ideas? i think there may be something wrong with the $sql query but i'm not sure what.
many thanks in advance!