I'm trying to connect database. Here's the details of my work:
$con=mysql_connect("localhost", "root","");
mysql_select_db("employees",$con);
if(!$con)
{
die("cant establish database connection".mysql_error());
}
else
{
echo "connection Created";
where in xamp my database,which i created in phpmyadmin in localhost xamp, is on the following directory:
C:\xampp\mysql\data
Here a folder named Employees is created then it has some files in it. when i run php file to create connection it shows nothing on the screen according to my code it must show :
connection created
now can anyone tell me where im wrong? why its not showing any output?