title: Notice: Undefined index PHP
body: <p>I'm trying to build a registration/login system from this video tutorial series:
  <a href="http://www.youtube.com/watch?v=S6vDgLwJ7n8" rel="nofollow">http://www.youtube.com/watch?v=S6vDgLwJ7n8</a></p>
  
  <p>I'm early in on this and if I don't get the answer I'm looking for will either 1. Give up or 2. Restart everything.
  Anyway, here's the error it's giving me:</p>
  
  <pre><code>Notice: Undefined index: CONFIG in C:\xampp\htdocs\php_login\classes\config.php 
  on line 5
  </code></pre>
  
  <p>My code:</p>
  
  <p>Config.php : </p>
  
  <pre><code>&lt;?php
  class Config {
  public static function get($path = null) {
  if($path) {
  $config = $GLOBALS['CONFIG'];
  $path = explode('/', $path);
  
  foreach($path as $bit) {
  if(isset($config[$bit])) {
  $config = $config[$bit];
   }
  }
  }
  
  return $config;
  }
  }
  </code></pre>
  
  <p>index.php:</p>
  
  <pre><code>&lt;?php
  require_once 'core/init.php';
  
  echo Config::get('mysql/host'); //'127.0.0.1'
  </code></pre>
  
  <p>init.php:</p>
  
  <p>
  
  <pre><code>$GLOBALS['config'] = array(
  'mysql' =&gt; array(
  'host' =&gt; '127.0.0.1',
  'username' =&gt; 'root',
  'password' =&gt; '',
  'db' =&gt; 'login'
  ),
  'remember' =&gt; array(
  'cookie_name' =&gt; 'hash',
  'cookie_expiry' =&gt; 604800
  ),
  'session' =&gt; array(
  'session_name' =&gt; 'user'
  )
  );
  
  function autoload($class) {
  require_once 'classes/' . $class . '.php';
  }
  spl_autoload_register('autoload');
  
  
  #JUST PUTTING THIS SHIT HERE:
  //spl_autoload_register(function($class) {
  // require_once 'classes/' . $class . '.php';
  //});
  //Un comment next line!
  //require_once 'functions/sanitize.php';
  </code></pre>