title: how to work with if define('DB_HOST','localhost')
body: <p>in the past I have used smt like:</p>
  
  <pre><code>$con = mysql_connect("localhost", "root", "root") or
  die("Could not connect: " . mysql_error());
  
  mysql_select_db("xxx");
  </code></pre>
  
  <p>But now, I've noticed everybody started using smt like this:</p>
  
  <pre><code>if (!defined('DB_HOST')) define('DB_HOST','localhost');
  if (!defined('DB_USER')) define('DB_USER','root');
  if (!defined('DB_PASS')) define('DB_PASS','root');
  if (!defined('DB_NAME')) define('DB_NAME','xxx');
  </code></pre>
  
  <p>What's different about their usage? For example echoing, filtering..</p>
  
  <p>Thanks for help</p>