connect php to mysql

Normally the database that used in PHP langguange is MYSQL..MYSQL is also the open-source software.Below is the example of php-mysql connection

mysql_connect(servername,username,password);

$conn = mysql_connect("localhost","root","root");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

?>

0 comments:

Post a Comment