1. Home
  2. Knowledge Base
  3. Web hosting
  4. How do I connect with my database with PHP?

How do I connect with my database with PHP?

Use the following code to connect with your database with a PHP script:

mysql_connect(‘mysqlhost’, ‘USERNAME’, ‘PASSWORD’);

mysqlselectdb(‘DATABASENAME’);

Updated on 8 March 2020

Was this article helpful?

Need Support?
Can't find the answer you're looking for?
Contact Support

Couldn't find a solution?

support_bottom_contact_alt

Our specialists are available 24/7 to provide you with free support. Feel free to contact Joachim and his colleagues via e-mail or by phone.

support_bottom_contact_alt
Joachim Coessens Specialist Support