0

I'm very new to this so hopefully its not too stupid a question.

I am building a basic app, at the moment its just the Login and registers screens. I have made a database on phpMyadmin and am using cPanel to put my .php files so the database can be updated from the registration screen. The app is building fine with no error and it all works fine till communicating with the database. I then get the below errors.

[08-Feb-2017 20:39:49 UTC] PHP Warning: mysqli_connect(): (HY000/1044): Access denied for user 'studyfor_Scott'@'localhost' to database 'studyfor_StudentInfo.StudentRegister' in /home/studyfor/public_html/Register.php on line 5

[08-Feb-2017 20:39:49 UTC] PHP Warning: mysqli_prepare() expects parameter 1 to be mysqli, boolean given in /home/studyfor/public_html/Register.php on line 14

[08-Feb-2017 20:39:49 UTC] PHP Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, null given in /home/studyfor/public_html/Register.php on line 15

[08-Feb-2017 20:39:49 UTC] PHP Warning: mysqli_stmt_execute() expects parameter 1 to be mysqli_stmt, null given in /home/studyfor/public_html/Register.php on line 16

Any help would be great.

Thank you

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • 1
    If the CONNECT fails so will everything else – RiggsFolly Feb 08 '17 at 23:01
  • You have to check if login data is written correctly: check login, password and db name. Also check user permissions. And you have to check if mysqli connection was successful. Otherwise it will show errors. P.S. NEVER ever use Mysqli. Use PDO instead! – krlc Feb 08 '17 at 23:01

0 Answers0