config.php 504 B

12345678910111213141516
  1. <!--Database connection, configured for MariaDB
  2. To avoid relative paths, include using the following method:
  3. $root = $_SERVER['DOCUMENT_ROOT'];
  4. include($root . "/config.php");//loads database stuff
  5. After the include, the database connection will be available at $db
  6. -->
  7. <?php
  8. define('DB_SERVER', 'localhost:3306');
  9. define('DB_USERNAME', 'root');
  10. define('DB_PASSWORD', 'admin');
  11. define('DB_DATABASE', 'noodle');
  12. $db = mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD,DB_DATABASE);
  13. ?>