Error when trying to login into my hosted site

Website URL

http://asrilaundry.free.nf/

Error Message

This page isn’t working

asrilaundry.free.nf is currently unable to handle this request.
HTTP ERROR 500

I’m importing my project database into the SQL Server, and I have also adjusted the database name, hostname, username, and database password in the database connection file in my project, but it seems i can’t login into my website

These are my code
Cuplikan layar 2023-12-05 110829

Please read

7 Likes

A few issues I can spot right away in the screenshot:

  • The new PDO() function requires a DSN as the first parameter, which is not a hostname. Please check the documentation or find a tutorial to learn how that works.
  • Your database user does not have permissions to create databases. Any database must be created ahead of time through the control panel or client area.
  • You should reference the database through the DNS, not use USE queries to switch. I’m not sure if this works at all with PDO. And if it does, then you’re still doing a useless extra query.
8 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.