PHP – MySQL Database Connection string

User avatar
admin
Site Admin
Posts: 35
Joined: Sun Jul 03, 2016 2:17 pm
Location: India
Contact:

PHP – MySQL Database Connection string

Postby admin » Sun Jul 03, 2016 5:00 pm

In order to connect MySQL database from PHP script one can use bellow mentioned sample script:

Code: Select all

<?
// Connect to the database
mysql_connect ('localhost', 'database Username', 'database password') ;
mysql_select_db ('database name');
?>



Thanks,
Have a nice day
Finest web hosting solution at the most affordable rates
Cheap Website Hosting
cheap VPS hosting india

Return to “Scripts / Code Snippets”

Who is online

Users browsing this forum: No registered users and 0 guests