vendredi 23 octobre 2020

Guys i need help ASAP im doing a project for a CS course. Registration process is ready but details arent being saved in a DB

this is the code for the connection:

    <?php
/* Database credentials. Assuming you are running MySQL

    enter code here

server with default setting (user 'root' with no password) */
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_NAME', 'registration');
 
/* Attempt to connect to MySQL database */
$mysqli = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
 
// Check connection
if($mysqli === false){
    die("ERROR: Could not connect. " . $mysqli->connect_error);
}
?>

it would be great if someone could aid me in this issue because my project is due in a few days and my entire future depends on it.




Aucun commentaire:

Enregistrer un commentaire