Connect to mysql
<?php
$host = "localhost";
//Select your host (ip), often "localhost"
$user = "root";
//Select your username to your mysql server
$pass = "PASSWORD";
//Select your password to your mysql server
$db_name = "DATABASE";
//Select your database
mysql_connect("$host", "$user", "$pass")or die("Cannot connect to server");
//Connect to your mysql
mysql_select_db("$db_name")or die("Cannot locate your database");
//Selecting your database
?>






There are currently no comments for this snippet.