i see you seeing the html outside your php..
try this connect script:
PHP Code:
<?
$hostname="localhost";
$mysql_login="username";
$mysql_password="password";
$database="database";
if (!($db = mysql_connect("$hostname", "$mysql_login" , "$mysql_password"))){
print("Can't connect.");
}else{
if (!(mysql_select_db("$database",$db))) {
print("Can't connect database.");
}else{
print("Connection Successful.");
}
}
?>