Multiple search parameters in PHP
<p>I have a form that allows for several different search option inputs. Such as text boxs and drop downs. As of now I search by waiting for a search REQUEST and then seeing if there is any character input in the various text boxes or what drop down option is selected. </p>

<p>Basically it is branches of conditional logic using if statements then modifying the sql statement depending what is chosen. How can I make it to where it supports single options or several linked together?</p>

<p>Example of current condititional logic</p>

<pre><code>$sql = "SELECT ";
if(strlen($_REQUEST['Option1']) &gt; 0) {
            $sql .= "* FROM Table Where Option1 = {$_REQUEST['Option1']} ";
            }
        if(strlen($_REQUEST['Option 2']) &gt; 0) {
            $sql .= "* From Table Where Option2 &gt;= {$_REQUEST['Option2']}";
</code></pre>

<p>I understand I need to use AND in the sql query. I tried to do it with arrays of options then looping through depending on the boolean state but it didn't work</p>
