title: Using AND/OR in if else PHP statement
body: <p>How do you use 'AND/OR' in an if else PHP statement? Would it be:</p>
  
  <p>1) AND</p>
  
  <pre><code>if ($status = 'clear' AND $pRent == 0) {
      mysql_query("UPDATE rent 
                      SET dNo = '$id', 
                          status = 'clear', 
                          colour = '#3C0' 
                    WHERE rent.id = $id");
  } 
  </code></pre>
  
  <p>2) OR</p>
  
  <pre><code>if ($status = 'clear' OR $pRent == 0) {
      mysql_query("UPDATE rent 
                      SET dNo = '$id', 
                          status = 'clear', 
                          colour = '#3C0' 
                    WHERE rent.id = $id");
  } 
  </code></pre>