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(){
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.