I checked your code and that contains the default connection values, which will not work. You’ll have to use the database host and the database name from the “MySQL Databases” section of the Control Panel, along with the correct username and password you can find by logging into your Client Area, clicking on your hosting account, scrolling down to “Account Details” and clicking on “Show/Hide” to show the password.
its from the w3school site. basically i dont know anything about sql and i am trying to connect it to my page anyways i figured out that i didnt enter the db name correctly