Page 1 of 1

How do you connet mysql database with PHP ?

Posted: Dec 16th, '13, 11:16
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