I have a search form:

```
<input type="text" name="srchby" />
<input type radio name="crit" value="a" />
<input type radio name="crit" value="b" />
<input type="submit" value="proceed" name="proceed"/>

```

I have an array which stores and gives search criteria whether the user chooses radio "a" or "b".

```
        $crit=mysql_real_escape_string($_POST["crit"]);
        $srchby=mysql_real_escape_string($_POST["srchby"]);

        $crar=array("a"=>array("column_name1","column_name2","table_name"),
        "b"=>array("column_name1","column_name2","table_name2"));

        mysql_query("SELECT '$crar[$crit][0]','$crar[$crit][1]' 
        FROM '$crar[$crit][3]' WHERE something='$srchby'");

```

Is that a good & fast option or not? Do you have any better ideas?

Thanks