$accepted = array(
'maker',
'family1',
);
$type = isset($_GET['type'])?$_GET['type'] : null;
$column = in_array( $type, $accepted ) ? $type : $accepted[0];
$_GET['maker'] = $_GET['maker'];
if(isset($_GET['maker']) && $_GET['maker']!="ALL" && $_GET['maker']!="")
{
$query_get = ("SELECT * FROM `Processors` Where Manufacture='".$_GET['maker']."'");
}
else
if(isset($_GET['family1']) && $_GET['family1']!="ALL" && $_GET['family1']!="")
{
$query_get = ("SELECT * FROM `Processors` Where Family_processor ='".$_GET['family1']."'");
}
else
{
$query_get = ("SELECT * FROM `Processors` ");
}
$result_get = mysql_query($query_get) or die(mysql_error());
while($row_get = mysql_fetch_assoc($result_get)){ $arr_get[] = $row_get; }
echo "<form action='index.php' method='get'>";
echo "<div class='newselect'>";
echo "<select class='chosen' name='maker' onChange='submit()'>";
echo '<option value="ALL">-- Производитель --</option>';
echo '<option value="ALL">Любой</option>';
while ($line = mysql_fetch_array($manufact)){
echo '<option value="'.$line['Manufacture'].'">'.$line['Manufacture'].'</option>'; }
echo "</select>";
echo "</div>";
echo "<div class='newselect'>";
echo "<select name='family1' onChange='submit()'>";
echo '<option value="">-- Семейство процессора --</option>';
echo '<option value="ALL">Любой</option>';
while ($line = mysql_fetch_array($family)){
echo '<option value="'.$line['Family_processor'].'">'.$line['Family_processor'].'</option>';}
echo "</select>";
echo "</div>";
echo "</form>";