title: Use of undefined constant HOST, USER, PASS, DBSA error?
body: <p>I´m having a problem and dont understand why is happening...</p>
  
  <p>This Way works fine:</p>
  
  <pre><code>&lt;?php
  
  
      $conn = mysql_connect('localhost','root','') or die ('Error connection&lt;strong&gt;'.mysql_error().'&lt;/strong&gt;');
      $dbsa = mysql_select_db('project') or die ('Error selecting bd:   &lt;strong&gt;'.mysql_error().'&lt;/strong&gt;');
  
  ?&gt;
  </code></pre>
  
  <p>Why this Way gives an error:</p>
  
  <pre><code>&lt;?php
  
          define(HOST,'localhost');
          define(USER,'root');
          define(PASS,'');
          define(DBSA,'project');
  
          $conn = mysql_connect(HOST,USER,PASS) or die ('Error connection&lt;strong&gt;'.mysql_error().'&lt;/strong&gt;');
          $dbsa = mysql_select_db(DBSA) or die ('Error selecting bd:   &lt;strong&gt;'.mysql_error().'&lt;/strong&gt;');
  
      ?&gt;
  </code></pre>
  
  <p>ERROS:</p>
  
  <p>Notice: <strong>Use of undefined constant HOST - assumed 'HOST'</strong> in F:\Xampp\htdocs\project\bd\connect.php on line 2</p>
  
  <p>Notice: <strong>Use of undefined constant USER - assumed 'USER'</strong> in F:\Xampp\htdocs\project\bd\connect.php on line 3</p>
  
  <p>Notice: <strong>Use of undefined constant PASS - assumed 'PASS'</strong> in F:\Xampp\htdocs\project\bd\connect.php on line 4</p>
  
  <p>Notice: <strong>Use of undefined constant DBSA - assumed 'DBSA'</strong> in F:\Xampp\htdocs\project\bd\connect.php on line 5</p>