title: PHP calculate delivery charges depending on postal code
body: <p>I'm trying to change some PHP code for an online shop and I having trouble changing a if/elseif part of the code. It should check if the country=x and postal code =y charge so many euro. There is a else if the country is not X to charge an international rate.</p>
  
  <p>The problem is that is charging every buyer the rate for postal codes included in the elseif declaration :(</p>
  
  <pre><code>if($_SESSION["usuario_alta"]["paisID"]==73)
  {
    if($_SESSION["usuario_alta"]["provinciaID"]==24 )
    {
      $_SESSION['compra_gastos_envio'] = 10.50*$_sMULTI;
      echo "10.50&amp;euro; x $_sMULTI = &lt;span&gt;&lt;b&gt;".$_SESSION['compra_gastos_envio']."&amp;euro;&lt;/b&gt;&lt;/span&gt;";
    }
    elseif($_SESSION["usuario_alta"]["provinciaID"]==35 || 43)
    {
      $_SESSION['compra_gastos_envio'] = 4.50*$_sMULTI;
      echo "4.50&amp;euro; x $_sMULTI = &lt;span&gt;&lt;b&gt;".$_SESSION['compra_gastos_envio']."&amp;euro;&lt;/b&gt;&lt;/span&gt;";
    }
    else
    {
      $_SESSION['compra_gastos_envio'] = 8.50*$_sMULTI;
      echo "8.50&amp;euro; x $_sMULTI = &lt;span&gt;&lt;b&gt;".$_SESSION['compra_gastos_envio']."&amp;euro;&lt;/b&gt;&lt;/span&gt;";
    }
  }
  else
  {
    $_SESSION['compra_gastos_envio'] = str_replace(",",".",$_SESSION["usuario_alta"]["gastos"])*$_sMULTI;
    echo $_SESSION["usuario_alta"]["gastos"]." x $_sMULTI = &lt;span&gt;&lt;b&gt;".$_SESSION['compra_gastos_envio']."&amp;euro;&lt;/b&gt;&lt;/span&gt;";
  }
  </code></pre>
  
  <p>I'm quite sure the answer is trivial, but I have been trying to google for a solution with no success for a while now.</p>
  
  <p>Thanks!</p>