Hello
The following code is from a form with a drop down menu:
Select a Consultee:
<select name="consultee_search">
<?
$sqlquery= "SELECT consultee_name, consultee_id from consultees;";
$process=odbc_exec($sqlconnect, $sqlquery);
while(odbc_fetch_row($process))
{
$consultee_name=odbc_result($process,"consultee_name");
$consultee_id=odbc_result($process,"consultee_id");
echo "<option value=$consultee_id>$consultee_name</option>";
}
?>
</select>
As you can see the code makes a drop down selection box where the contents of the field consultee_name from the table consultees are displayed. The page that the form results are displayed on has the code
WHERE doc_consultees.consultee_id=".$_POST['consultee_search']."
in the SQL statement.
I would like to have an option in the dropo down menu of 'ALL' though. And I just can't figure out how to do this.
Would I have to create a consultee_name of ALL within the database table consultees. Then how would I associate 'ALL' with all the consultee_id's?
Any suggestions or tips appreciated
Thank you