How can I continue correctly my if statements in my code?
<p>my script should do this:</p>

<p>Check if there is a $startprice and $endprice for a product. Those variables are checked against the $price that is the product's price.</p>

<p>The user is able to add both ($startprice and $endprice) or just one of them or nothing of them.</p>

<ul>
<li>In the case that he adds only the
$startprice, the $price must be
bigger than this.</li>
<li>In the case that he adds only the
$endprice, the $price must be smaller
than this.</li>
<li>In the case that he adds both, the
$price must be between of them.</li>
<li>In the case that he does not add
anything, the script will show all
the results.</li>
</ul>

<p>If the data satisfies the statements, it will show the product's list. In all cases the product's list code is the same.</p>

<p>*<strong><em>What I did until now is this but I can't continue it correctly.</em></strong></p>

<p>The product's price is named $price and I can get it correctly for each product.</p>

<pre><code>   &lt;?php
    $startprice = $_GET['startprice'];
    $endprice = $_GET['endprice'];

    // this is the between code and it's the only I know how to do...

    if (($startprice &lt;= $price) &amp;&amp; ($endprice &gt;= $price)) { ?&gt;
    &lt;h2&gt; &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt; &lt;strong&gt;  &lt;?php the_title(); ?&gt;  &lt;/strong&gt;&lt;/a&gt;&lt;/h2&gt;
 &lt;? } ?&gt;
</code></pre>
