<?php $servername = "localhost"; $username = "root"; $password = ""; $dbname = "course_enrolment"; $conn = mysqli_connect($servername, $username, $password, $dbname); if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } ?> <!DOCTYPE html> <html> <head> <title>Minerva Timetable</title> </head> <body> <h1>The Minerva bus company Timetable</h1> <?php
mysqli_connect_errno()
... if (mysqli_connect_errno() <> 0) { die("Connection failed: " . mysqli_connect_error()); } ...
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)