Why can I not access SQL?

When I try to connect I get this error:

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /storage/h10/802/1164802/public_html/login.php:14 Stack trace: #0 /storage/h10/802/1164802/public_html/mainlogin.php(2): include() #1 {main} thrown in /storage/h10/802/1164802/public_html/login.php on line 14

Here is the code I have on line 14:
$connection = mysql_connect(“localhost”, “id1164802_testuser”, “testpass”)

in most cases when database connection do not work, password change solves the issue. Just go to new panel, change database password to new one, login to phpMyAdmin and if it works try it in your script.

means that you are using old php version. You have 2 options:

  • change code to latest php code
  • downgrade php version in cpanel