MySQL


How do I connect to MySQL using PHP?
<?php
$username = "your_name";
$password = "your_password";
$hostname = "localhost";


//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
echo "Connected to MySQL
"; ?>