title: PHP conditionals, brackets needed?
body: <p>I was just browsing a forum and someone asked about a PHP file they had found on the web.  It has several spots like this in the code:</p>
  
  <p><code>if ($REMOTE_ADDR == "") $ip = "no ip";
  else $ip = getHostByAddr($REMOTE_ADDR);</code></p>
  
  <p>I have always thought brackets are needed to enclose what you want to do if the condition is true.  Is there some other alternative, such as if it is on the same line you don't?</p>
  
  <p>There is also another line like this:
  <code>if ($action != ""):
  mail("$adminaddress","Visitor Comment from YOUR SITE",</code></p>
  
  <p>My instinct is to say this wouldn't work, but I also don't know if it is an outdated PHP file and it used to work?</p>