Can't connect db to 000 webhosting


Hey guys

I am trying to connect to the database with my php, should I leave the password blank because I tried it with my password and it won’t connect, just show the die message:


$dbservername = “localhost”;
$dbroot = “id6336468_piano011”;
$dbpassword = “”;
$dbdatabase = “id6336468_loginsystem”;

$conn = @mysqli_connect($dbservername, $dbroot, $dbpassword, $dbdatabase) or die(‘Could not connect to database due to maintenance. Please login later…’);


Looks fine here, no you need to use the password.


This is weird… now I am getting this page…


Use the link from > Manage Database > phpMyAdmin to login.


From this page?


Yes, Manage, phpMyAdmin.


I have but for some reason, it is not working at the moment…



Log out of, log back in usually cures it.


So, my database credentials are correct and I should be able to connect?I have logged out and logged back in and it seems to be working but my page doesn’t look correct…

It should look something like this on my locahost:


Tried changing your PHP version via general settings to what you are running locally?


I am just a beginner here, could you guide me on this? thanks


Login to > settings> general > Change PHP version


I have found out that I am using version 7.0.6 but it still doesn’t look right


This is very odd indeed as I have checked my code and it looks correct but the CSS doesn’t seem to be working…This is also bizarre… When I tried to logout, it is showing two includes folder but I only have one include folder…


Think you highlighted the error yourself there…

includes/includes ??


I am confused here because I only have one folder called includes in my file…


I think it is my login credentials as I tried to login again with the following information without a password:


$dbservername = "localhost";
$dbroot = "id6336468_piano011";
$dbpassword = "";
$dbdatabase = "id6336468_loginsystem";

$conn = @mysqli_connect($dbservername, $dbroot, $dbpassword, $dbdatabase) or die('Could not connect to database due to maintenance. Please login later....');

But I got this on my screen:

I got the die message appearing instead…


Replace or die('Could not connect to database due to maintenance. Please login later....')
By or die(mysqli_error($conn))


I have the following error

Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given in /storage/ssd1/468/6336468/public_html/includes/dbh.php on line 8


Are you sure the password is correct?