How do you connet mysql database with PHP ?

All discussions regarding computers and internet.

Post Reply
User avatar
chinmay.sahoo
Little Oriya
Little Oriya
Posts: 5
Joined: Dec 16th, '13, 10:40
Location: Odisha
Contact:

How do you connet mysql database with PHP ?

Post by chinmay.sahoo »

We can connect Mysql Database with PHP using both Procedural and Object oriented style like below
$link = mysqli_connect("localhost", "username", "password", "dbofpcds");

$mysqli = new mysqli("localhost", "username", "password", "dbname");
and in old type of connectivity were
$link = mysql_connect("localhost", "username", "password");
mysql_select_db("database",$link);

Regards
Image
Software Development Company
A Complete Software Development Services
webtechnologyofindia.com

How do you connet mysql database with PHP ?

Sponsor

Sponsor
 

Post Reply