| 20 | 
           rodolico | 
           1 | 
           <?php
  | 
        
        
            | 
            | 
           2 | 
              // Several ways to do this. You can set up the correct variables here
  | 
        
        
            | 
            | 
           3 | 
              | 
        
        
            | 
            | 
           4 | 
              /*
  | 
        
        
            | 
            | 
           5 | 
              // name of database to connect to
  | 
        
        
            | 
            | 
           6 | 
              $db_name = 'camp';
  | 
        
        
            | 
            | 
           7 | 
              // username for the connection
  | 
        
        
            | 
            | 
           8 | 
              $db_username = 'joe';
  | 
        
        
            | 
            | 
           9 | 
              // password for the connection
  | 
        
        
            | 
            | 
           10 | 
              $db_password = 'jane';
  | 
        
        
            | 
            | 
           11 | 
              // hostname for the connection (defaults to 127.0.0.1)
  | 
        
        
            | 
            | 
           12 | 
              $db_hostname = '127.0.0.1';
  | 
        
        
            | 
            | 
           13 | 
              */
  | 
        
        
            | 
            | 
           14 | 
              | 
        
        
            | 
            | 
           15 | 
              /*
  | 
        
        
            | 
            | 
           16 | 
               * I prefer to move my config file outside of DocumentRoot
  | 
        
        
            | 
            | 
           17 | 
               * then, include_once it into this. It can be done multiple ways
  | 
        
        
            | 
            | 
           18 | 
               * and there are others that are better, but I have the config 
  | 
        
        
            | 
            | 
           19 | 
               * stored one level up from DocumentRoot, and named it camp2_config.php
  | 
        
        
            | 
            | 
           20 | 
               */
  | 
        
        
            | 
            | 
           21 | 
              // we dont' want it visible, so just include it this way.
  | 
        
        
            | 
            | 
           22 | 
              include_once( realpath( $_SERVER['DOCUMENT_ROOT'] . '/../camp2_config.php' ) );
  | 
        
        
            | 
            | 
           23 | 
           ?>
  |