IF POST Variables equals then redirect
<p>Im trying to get form post values and if they match certain criteria redirect only my page doesnt seem to...</p>

<p>I have a form with multiple input fields</p>

<p><em><strong>HTML</em></strong></p>

<pre><code>&lt;form method="post" action="?page_id=151"&gt;

  &lt;div style="display: block;" id="Q1"&gt;
                    &lt;label for="vehicleType"&gt;1. What type of vehicles do you have?&lt;/label&gt;
                    &lt;select id="vehicleType" name="vehicleType"&gt;
                        &lt;option selected="selected" value="choose"&gt;Please choose&lt;/option&gt;
                        &lt;option value="hgv"&gt;HGV&lt;/option&gt;
                        &lt;option value="psv"&gt;PSV&lt;/option&gt;
                        &lt;option value="lgv"&gt;LGV&lt;/option&gt;
                        &lt;option value="car"&gt;Car&lt;/option&gt;                            
                        &lt;option value="mixed"&gt;Mixed Fleet&lt;/option&gt;
                    &lt;/select&gt;
                &lt;/div&gt;

                &lt;div id="Q2group1"&gt;
                    &lt;label for="coverageRegion"&gt;2. Do you require national or international coverage?&lt;/label&gt;
                    &lt;select id="coverageRegion" name="coverageRegion"&gt;
                        &lt;option selected="selected" value="choose"&gt;Please choose&lt;/option&gt;
                        &lt;option value="national"&gt;National&lt;/option&gt;  
                        &lt;option value="international"&gt;International&lt;/option&gt;
                    &lt;/select&gt;
                &lt;/div&gt;

                &lt;div id="Q2others"&gt;
                    &lt;label for="pricing"&gt;2. Do you prefer a fixed weekly price or a pump-related price?&lt;/label&gt;
                    &lt;select id="pricing" name="pricing"&gt;
                        &lt;option selected="selected" value="choose"&gt;Please choose&lt;/option&gt;
                        &lt;option value="fixed"&gt;Weekly fixed price&lt;/option&gt;  
                        &lt;option value="pump"&gt;Pump-related price&lt;/option&gt;
                    &lt;/select&gt;
                &lt;/div&gt;

                &lt;div id="Q3group1"&gt;
                    &lt;label for="locationType"&gt;3. What type of site do you prefer?&lt;/label&gt;
                    &lt;select id="locationType" name="locationType"&gt;
                        &lt;option selected="selected" value="choose"&gt;Please choose&lt;/option&gt;
                        &lt;option value="truckstops"&gt;Truck stops at lowest price&lt;/option&gt;  
                        &lt;option value="motorway"&gt;Branded motorway sites&lt;/option&gt;
                    &lt;/select&gt;
                &lt;/div&gt;


             &lt;div id="Q3others"&gt;
                    &lt;label for="siteCoverage"&gt;3. What site coverage do you need?&lt;/label&gt;
                    &lt;select id="siteCoverage" name="siteCoverage"&gt;
                        &lt;option value="choose"&gt;Please choose&lt;/option&gt;
                        &lt;option value="countysites"&gt;County&lt;/option&gt;
                        &lt;option value="nationalsites"&gt;National&lt;/option&gt;
                    &lt;/select&gt;
                &lt;/div&gt;


                &lt;div id="Q4others"&gt;
                    &lt;label for="county"&gt;4. Select your county:&lt;/label&gt;
                    &lt;select id="county" name="county"&gt;
                        &lt;option value="choose"&gt;Please choose&lt;/option&gt;
                        &lt;optgroup label="England"&gt;
                            &lt;option&gt;Bedfordshire&lt;/option&gt;
                            &lt;option&gt;Berkshire&lt;/option&gt;
                            &lt;option&gt;Bristol&lt;/option&gt;
                            &lt;option&gt;Tyrone&lt;/option&gt;
                        &lt;/optgroup&gt;
                    &lt;/select&gt;&lt;/div&gt;

                &lt;div id="searchbuttondiv"&gt; &lt;input type="submit" id="searchbutton" onclick="_gaq.push(['_trackEvent', 'Fuel Card Search', 'Homepage Select Criteria'])"&gt;    &lt;/div&gt;   

            &lt;/form&gt;
</code></pre>

<p><em><strong>PHP</em></strong></p>

<pre><code>if ($_POST['vehicleType'] == 'car' &amp;&amp; $_POST['pricing'] == 'fixed' &amp;&amp; $_POST['coverageRegion'] == 'national') {
        echo '&lt;script&gt;alert("hi");&lt;/script&gt;';
        // header('Location: /car-weekly-national/');
    }
</code></pre>
