Before we do anything else we want to create a file that are essential when we want to connect to the database we just created. This file must later on be included in all files that want to communicate with the database.
Create a new file and save it as mysq_conn.php in the folder cms/php/ (From now on all file locations and names will only be addressed in the header). This file should contain the following lines of code: (PHP-code will always have a pink background in this tutorial)
<?php
$CONN_NAME = "localhost";
$CONN_USER = "root";
$CONN_PASS = "enter your password here";
$conn = mysql_connect($CONN_NAME,$CONN_USER,$CONN_PASS);
if (!$conn) {
die('Could not connect: '.mysql_error());
}
mysql_select_db("atsumerugamer",$conn);
?>
This file will open a database connection to your server. In this file you enter the password for your database. If your database isn't password protected you doesn't need to enter the green code. In fact you don't need to enter the $CONN_NAME either since it's "localhost" by default. However, if you want to put your CMS online you will probably need all these lines so put them in there.
Next Up: Creating the first page