connecting to the database in TD-CMS is very easy and straightforward
first you'll need to rename "db.sample.php" to "db.php"
this is how "db.sample.php" looks like by default:
<?php
$servername = "";
$username = "";
$password = "";
$dbname = "";
// create connection
//$conn = new mysqli($servername, $username, $password, $dbname);
$conn = mysqli_connect($servername, $username, $password ,$dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . $conn->connect_error);
}
//echo "<p>connection to the database was successfully</p>";
after you renamed "db.sample.php" to "db.php"
you'll need to follow the next steps.
replace localhost near "$servername" with the host of your MySQL server
replace root near "$username" with the username of your MySQL server
replace usbw near "$password" with the password of your MySQL server
replace cms near "$dbname" with the database name of your MySQL server
that's it your now connected to your database well done