title: PHP IF Statement executing both conditions
body: <p>I'm currently integrating a payment system into my website. I have a response script which basically takes in the data from the secure server and displays to the customer if the payment has gone through or not. My problem is that the if statement is actually displaying both messages to the customer, even if the payment has been successful or unsuccessful. </p>
  
  <p>Here is the If statement:</p>
  
  <pre><code>&lt;?
  if ($result == "00") &amp;&amp; ($payersetup == "00") &amp;&amp; ($pmtsetup =="00"){
  ?&gt;  
  Thank you
  &lt;br/&gt;&lt;br/&gt;
  To return to the home page &lt;a href="http://www.xx.com"&gt;&lt;b&gt;&lt;u&gt;click here&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;
  &lt;br/&gt;&lt;br/&gt;
  
  &lt;?
  } else {
  ?&gt;
  
  &lt;br/&gt;&lt;br/&gt;
  There was an error processing your subscription.  
  To try again please &lt;a href="http://www.xx.com/signUp.html"&gt;&lt;b&gt;&lt;u&gt;click here&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;&lt;br&gt;&lt;BR&gt;
  Please contact our customer care department at &lt;a href="mailto:support@xx.com"&gt;&lt;b&gt;&lt;u&gt;support@xx.com&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;
  
  &lt;?
  }
  ?&gt;
  </code></pre>
  
  <p>I have also tried doing this the following way, however with this method, the body is blank - no text is displayed.</p>
  
  <pre><code>&lt;?
  if ($result == "00") &amp;&amp; ($payersetup == "00") &amp;&amp; ($pmtsetup =="00"){
  $thanks = "Thank you! \n\n To Return to the homepage &lt;a href=http://www.epubdirect.com&gt;Click Here&lt;/a&gt;"; 
  echo $thanks;
  } 
  else 
  {
  $nothanks = "There was an error processing your subscription.\n\n To try again please &lt;a href=http://www.epubdirect.com/signUp.html&gt;click here&lt;/a&gt;. \n\n If the problem persists, please contact our customer care department at &lt;a href=mailto:support@epubdirect.com&gt;support@epubdirect.com&lt;/a&gt;";
  echo $nothanks;
  }
  ?&gt;
  </code></pre>
  
  <p>And after that I tried to put the HTML into a seperate document and use require_once() but this didn't work either - same result as previous - blank body. </p>
  
  <p>Any one have any ideas? </p>
  
  <p>EDIT:</p>
  
  <p>I have tried some of the ways suggested however I'm still having the blank page problem :(</p>
  
  <p>Here is the way I have gone -></p>
  
  <pre><code>&lt;?
  if (($result == "00") &amp;&amp; ($payersetup == "00") &amp;&amp; ($pmtsetup =="00"))
  {
  require_once('thankyou.html');
  } 
  else 
  {
  require_once('error.html');
  }
  ?&gt;
  </code></pre>
  
  <p>This still gives me a blank page even though the syntax looks right?</p>