hiya
I have a drop down box
<select name="severity">
<option>Severity</option>
<option>Crash</option>
<option>Major</option>
<option>Minor</option>
<option>Review</option>
</select>
//I want to send the selected option and build a sql query to the
//db
<?
$selects = array('severity','crash','major','minor','review');
$select = strtolower($_POST['severity']);
if (!in_array($select, $selects))
{
$select = 'severity';
}
$Severityquerystring = "SELECT bugid, status, severity, assigned_to, summary, date_opened, estimated_completion, related_file, created_by
FROM Bug ORDER BY '$select' LIMIT 40";
?>
// then now in a table in form
if (isset($severity))
{
$querystring = ($Severityquerystring);
}
else
{
$querystring= "SELECT * FROM bug";
}
$db_result = mysql_query($querystring) or die(mysql_error());
There has to be an easier way of connecting drop down options to a dynamic table. Someone suggested using JavaScript.....
Can anyone build on this suggestion or offer advice to get this working.
Many thanks