title: Undefined variable $db_hostname
body: <p>I'm working with mysql and I'm trying to make a simple login to the database, but whenever I try to do it I get an error </p>
  
  <pre><code>Notice: Undefined variable: db_hostname in D:\xampp\htdocs\index.php on line 3
  Notice: Undefined variable: db_username in D:\xampp\htdocs\index.php on line 3
  Notice: Undefined variable: db_password in D:\xampp\htdocs\index.php on line 3
  </code></pre>
  
  <p>here is my code for the login.php</p>
  
  <pre><code>&lt;?php//login.php
  
          $db_hostname = 'localhost';
          $db_database = 'publications';
          $db_username = 'root';
          $db_password = '';
  
  
  ?&gt;
  </code></pre>
  
  <p>code for index.php</p>
  
  <pre><code>&lt;?php 
  
  
        require_once('login.php') ;
        $db_server = mysql_connect($db_hostname, $db_username, $db_password);
  
        if(!$db_server) die ("Unable to connect to MySQL: " . mysql_error());
  
  
  
  
  
  
    ?&gt;
  </code></pre>
  
  <p>I have no idea what I'm doing wrong.</p>