title: PHP - using if conditions to redirect to different pages
body: <p>I want to redirect to different pages on an if condition using php.(not javascript) I tried as the example <a href="https://stackoverflow.com/questions/13231254/how-to-redirect-to-onother-page-after-if-condition-is-satified-in-php">here</a>. But unfortunately it doesn't works for me. :/ Here's my code:</p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
          &lt;?php
              $time_type = $_POST['time_type'];
              $driver_type = $_POST['driver_type'];
  
              if (strcmp($time_type, "Arrival") &amp;&amp; strcmp($driver_type, "Customer") )
              {
                  header('location: http://localhost:8080/Project/Enter_Details.html');
                  exit();
              }
          ?&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This php is linked to a html page below.</p>
  
  <pre><code>&lt;html&gt;
      &lt;title&gt; Shopping Complex&lt;/title&gt;
  
      &lt;body&gt;
          &lt;form name = "Type" action = "Type.php" method = "POST"&gt;
              &lt;fieldset&gt;
                  &lt;table&gt;
                      &lt;p&gt;
                          &lt;tr&gt;
                              &lt;td&gt;&lt;input type = "radio"
                                     name = "time_type" value = "Arrival"&gt;Arrival&lt;/input&gt;
                                  &lt;input type = "radio"
                                     name = "time_type" value = "Departure"&gt;Departure&lt;/input&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td&gt;&lt;input type = "radio"
                                     name = "driver_type" value = "Staff"&gt;Staff&lt;/input&gt;
                                  &lt;input type = "radio"
                                     name = "driver_type" value = "Customer"&gt;Customer&lt;/input&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/p&gt;
                      &lt;p&gt;
                          &lt;tr&gt;
                              &lt;td&gt;&lt;input type = "submit"
                                         value = "Go" id = "buttonId"&gt;&lt;/input&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/p&gt;
                  &lt;/table&gt;
              &lt;/fieldset&gt;
          &lt;/from&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Please Help me out of this......</p>