I use this as a script for noobs, it works easy
mysql.php$server = "localhost"; //Deafault is localhost, only change if you are using this script remotely$user = "root"; //mysql user$password = ""; /mysql pass$database="db"; //databse#################################DO NOT EDIT BELOW THIS LINE################################mysql_connect($server, $user, $pass) or die("Could not connect to mysql: ".mysql_error()); mysql_select_db($database) or die("Could not connect to mysql database: ".mysql_error());then in any page you want to use, as long as it is in the same folder, do <?php include("mysql.php"); ?><html> <body>page here</body</html>