1. Home
  2. Knowledge Base
  3. Web hosting
  4. Database
  5. 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?

Related Articles