SQL QUERY
if ($_SERVER ['REQUEST_METHOD'] == 'POST') {
if ($_POST['mylist1'] == 'm2') {
$sql="SELECT Products, TABLE 1";
$rs=odbc_exec($conn,$sql);
odbc_result_all($rs);
echo 'With this package you can registar for any of our domains';
}
elseif ($_POST['mylist'] == 'm3') {
$sql="SELECT Products, Table2";
$rs=odbc_exec($conn,$sql);
odbc_result_all($rs);
echo 'With this package you can registar for any of our domains';
FORM 1
echo '
<form name="input" action="abc2.php" method="GET"> <div align= "left">
<b>City:</b>
<select NAME="list1">
<OPTION VALUE="m1"></option>
<OPTION VALUE="m2">London</option>
<OPTION VALUE="m3">Paris</option>
<OPTION VALUE="m4">Tokoyo</option>
</select>
<br/><br/>
<b>Monthly Class:</b>
<select NAME="list2">
<OPTION VALUE="m1"></option>
<OPTION VALUE="m2">First Class</option>
<OPTION VALUE="m3">Economy</option>
</select>
Please how can I write a query that if a customer selects m2 FROM list1 AND m3 FROM list2 it should display Table 1 and if the customer select m3 FROM list1 and m2 FROM list2 it should display Table2. I look forward to your replies and thanks very much in advance