Databases

This small snippet of code is one of the most important components to the software and is located in the following location;

admin > foundation > blueprint > db-connect.php

This component is what connects you to the database stored on your server. This file needs to be manually edited to reflect your website database information. Please replace the following fields with your data.

<?php

// Database Details

$db_host = 'localhost';

// Replace this with your database admin user

$db_admin = 'database_admin';

// Replace this with your database admin user password

$db_password = 'password';

// Replace this with your database name

$db_name = 'database_name';

$con = mysqli_connect($db_host, $db_admin, $db_password, $db_name);

// Check Database Connection

if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }

?>

Please contact your hosting provider or server manager on how to create a mySQL database as well as a database admin user if you do not know how. It is essential that you use mySQL until we develop other database platforms as the entire software is designed around it.

If you do not have mySQL on your server it is a free and open-source database software that can be easily installed. You can read more about mySQL by clicking here or by visiting https://www.mysql.com.

Sabali Co - CMS

CMS