I have this site:
http://www.fireplaceindustry.co.uk/search.htmit is a page with frames..
the upper frame is named up.php and here's the source:
it uses the data.php file to print search results.
I want to make it so that when there's a name entered in the Company box, the other fields should be ignored..
and if the other fields are chosen, than the name box should be ignored..
is it possible to do this with 2 submit buttons or do I need 2 separate forms for that?
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=windows-1254">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-9">
<title>FirePlaceIndustry.c
o.uk</titl
e>
<base target="main">
</head>
<body leftmargin="0">
<div align="center"><center>
</center></div><div align="center"><center>
<table border="0" width="757" height="27" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="27" align="left"><form method="GET" target="main"
action="data.php">
<table border="0" width="587" height="1" cellspacing="0" cellpadding="0">
<tr>
<td width="83" height="15"><font face="Verdana" size="1"><strong>Company
</strong></font></td>
<td width="41"><font face="Verdana" size="1"></font></td>
<td width="42"><font face="Verdana" size="1"><strong>Product</
strong></f
ont></td>
<td width="165" height="15"><font face="Verdana" size="1"><strong>Category
<?php
$dbcnx = @mysql_connect(
"localhost", "fireplac", "ongIboSAH");
mysql_select_db("fireplac"
);
$categories = mysql_query(
"SELECT ID, category from category order by ID ASC");
?>
<?php
$dbcnx = @mysql_connect(
"localhost", "fireplac", "ongIboSAH");
mysql_select_db("fireplac"
);
$counties = mysql_query(
"SELECT ID, county from county order by county ASC");
?>
<input name="page2" type="hidden" value=0>
</strong></font></td>
<td width="117" height="15"><font face="Verdana"
size="1"><strong>County</s
trong></fo
nt></td>
<td width="46" height="15"></td>
<td width="88" height="15"></td>
<td width="5" height="15"></td>
</tr>
<tr>
<td width="83" height="1" valign="middle"><input name="name" type="text"
id="name"
style="font-family: verdana; width: 145px; font-size: 10px" size="17"></td>
<td width="41" height="1" valign="middle"><input name="Search2" type="submit"
id="Search23"
style="background-color: rgb(0,48,156); color: rgb(156,207,254); font-family:
Verdana; font-size: 10px; font-weight: bold; border: 1 solid" value="Search"></td>
<td width="42" height="1" valign="middle"><select name="product"
size="1" id="select12"
style="font-size: 10px; width: 145px; font-family: verdana; color: rgb(0,0,0);
border: 1 solid rgb(0,0,0)" width="10">
<option selected>Select A Product</option>
<option>--------</option>
<option value="electric">Electric Fires</option>
<option value="gas">Gas Fires</option>
<option value="fireplaces">Firepla
ces</optio
n>
<option value="stoves">Stoves</opt
ion>
<option value="nochimney">No Chimney Products</option>
<option value="solid">SoliFuel</op
tion>
<option value="lpg">LPG Appliances</option>
<option value="chimney">Chimney Products</option>
<option value="cast">Cast Products</option>
<option value="marble">Natural Marble</option>
<option value="stone">Stone Products</option>
<option value="accessories">Access
ories</opt
ion>
</select></td>
<td width="165" height="1" valign="middle"><select name="CATID"
size="1" id="CATID"
style="font-size: 10px; width: 145px; font-family: verdana; color: rgb(0,0,0);
border: 1 solid rgb(0,0,0)" width="10">
<OPTION SELECTED VALUE="">Select a Category
<OPTION VALUE="">---------
<?php
while ($category = mysql_fetch_array($categor
ies)) {
$CATID = $category["ID"];
$categoryname = $category["category"];
echo("<OPTION VALUE=$CATID>$categoryname
\n");
}
?>
</select></td>
<td width="117" height="1" valign="middle"><select name="COTID"
size="1" id="COTID"
style="font-size: 10px; width: 145px; font-family: verdana; color: rgb(0,0,0);
border: 1 solid rgb(0,0,0)" width="10">
<OPTION SELECTED VALUE="">Select a County
<OPTION VALUE="">---------
<?php
while ($county = mysql_fetch_array($countie
s)) {
$COTID = $county["ID"];
$countyname = $county["county"];
echo("<OPTION VALUE=$COTID>$countyname\n
");
}
?>
</select></td>
<td width="46" height="1" align="center" valign="middle"><input name="Search"
type="submit" id="Search3"
style="background-color: rgb(0,48,156); color: rgb(156,207,254); font-family:
Verdana; font-size: 10px; font-weight: bold; border: 1 solid" value="Search"></td>
<td width="88" height="1"><div align="right">
<p align="center"><font size="1" face="Verdana, Arial, Helvetica,
sans-serif"><?php echo ( date("d.m.Y")); ?>
</font><font color="#FFFFFF"> </font></td>
<td width="5" height="1"></td>
</tr>
</table>
</form> </td>
</tr>
</table>
</center></div>
</body>
</html>