title: file_get_contents() is still run even in else statement that doesn't run
body: <p>I have something pretty weird going on where I'm sure I'm doing something really dumb, but at this point I'll take all help I can get.</p>
  <p>Opening url: xxx/order/?type=samples&amp;quote=643&amp;decoration=no&amp;quantity=10000&amp;user=16</p>
  <p>Note <strong>quote</strong> is set.</p>
  <p>Now I've got this PHP code (it's inside a WordPress page but I don't think that matters):</p>
  <pre><code>if (isset($_GET['quote'])) {
      $order_id = $_GET['quote'];
      $product= get_field('product_link',$order_id);
      $no = 1;
  } else {
      $product=$_GET['product'];
      $user = $_GET['user'];
      $unit_cost = get_field('10k_base_cost', $product)*(1+(get_field('duties', $product)/100))*(1+(get_field('markup', $product)/100));
      $product_moq = get_field('moq', $product);
      $product_moq = intval($product_moq);
      $site_url = get_site_url(); 
      $url = $site_url.&quot;/request-quote/?product=&quot;.$product.&quot;&amp;decoration_1=0&amp;decoration_2=0&amp;decoration_3=0&amp;decoration_4=0&amp;quantity=&quot;.$product_moq.&quot;&amp;unit_cost=&quot;.urlencode($unit_cost).&quot;&amp;user=&quot;.$user.&quot;&amp;supress_redirect=1&quot;;
      $order_id =file_get_contents($url);
  }
  </code></pre>
  <p>Now... file_get_contents calls a file that runs some code. Should only be called when quote isn't set. However, it is <strong>always</strong> ran. Without values (I think) set (i.e. product etc) but still, always ran.</p>
  <p>How is beyond me but I'm sure it's obvious. Not a &quot;professional programmer&quot; here :-)</p>
  <ol>
  <li>I've tried to separate it between if XX and if !XXX</li>
  <li>I've tried to make it a CURL requests vs. file_get_contents</li>
  </ol>
  <p>Thanks for any pointer in the right direction...</p>