means you haven't set up your conection properly or you haven't chosen a database that exists or you don't have access etc etc etc ... use the function below to show details of mysql errors.
<?php
// your details
$host=2localhost"; // normal default
$user="your_username";
$pass="your_password";
$database="your_database";
// database connect and select
// note: we hide the general spam using @ as we get detailed spam from the function
$connection=@mysql_connect($host.$user,$pass);
mysql_checkerror();
@mysql_select_db($database,$connection);
mysql_checkerror();
//ALL your stuff in here
stuff
//end your stuff
// functions
// check mysql errors and print them out meaningfully
function mysql_checkerror(){
$err_no=mysql_errno();
if ($err_no > 0 ){
echo "<h2> Error:</h1> " . mysql_errno() . ": " . mysql_error() . "<br>\n";
exit;
}
}
?>
______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.