Thought someone should write about how to connect. Hell, I'm bored and hopefully someone will find it useful!
Code:
$link = mysql_connect("localhost", "<user>", "<password>") or die("Could not connect");
mysql_select_db("<Database Name>") or die("Could not select database");
$result = mysql_query("SELECT * FROM <table> WHERE <whatever>",$link);
while ($row = mysql_fetch_array($result)) {
<do stuff with the row>
}
You can use 'mysql_fetch_array' to get the column names into things like $row['surname'], or use 'mysql_fetch_row' to end up with $row[1] etc... which can be a bugger to debug.
Hope that's of some use