<?php
//Mysql connection
$con=mysql_connect("localhost","root","");
if (mysqli_connect_errno()) {
echo " Failed to connect to MySQL: " . mysqli_connect_error();
}
//Select particular db
mysql_select_db("test",$con);
?>
//Mysql connection
$con=mysql_connect("localhost","root","");
if (mysqli_connect_errno()) {
echo " Failed to connect to MySQL: " . mysqli_connect_error();
}
//Select particular db
mysql_select_db("test",$con);
?>