MilesWeb Hosting Forum

Web Hosting Technical Support => How To's => Topic started by: Dipak Bhoi on September 05, 2014, 11:46:49 PM

Title: How To Create MySQL Connection Strings ?
Post by: Dipak Bhoi on September 05, 2014, 11:46:49 PM
Hello guys,

MySQL Connection Strings : A connection string is a sequence of variables which will address the specific database and allow you to connect your code to your MySQL database. But first you need to create a Database from cPanel.

Connection String Syntax :

For PHP :

Quote$dbh=mysql_connect ("localhost", "db_Username", "password")
or die ('I cannot connect to the database.');
mysql_select_db ("db_Name");

That's all.

Enjoy !!!