This tutorial is quite easy. If you want to connect to a mysql database you can use something like this:
$host = 'localhost'; $username = 'yourusername'; $password = 'yourpassword'; $databasename = 'yourdbname'; //don't edit this stuff okay? $connect = mysql_connect($host, $username, $password); $selectdb = mysql_select_db($databasename); if($connect == true){ echo 'Connected fine!'; } else { echo 'Bad Username or Password.....or host dummy!!!!'; } if($selectdb == true){ echo 'Connected to DB master :D'; } else { echo 'Cant find that database....did we connect?'; }
So this code basically connects to the database and says hi!
More to come on DB Functions

Want To Be Heard? Comment Here!
// I Love Comments, Especially Nice Ones
You can follow any responses to this entry via its RSS comments feed. You may also leave a trackback by clicking this link.