Here's a generic example of a MySQL query in PHP. It may need to be adjusted, but you'll need all of these parts:
PHP Code:
<?php
mysql_connect(/*username, password, etc.*/); //must connect to the database before anything else
mysql_select_db('mydatabase'); //mysql requires selecting a database to begin
$query = 'SELECT `something` FROM `table` WHERE `condition`='.mysql_real_escape_string($value);
//write the actual query
//and include a condition as needed
//and be sure to ESCAPE any user-generated input for security reasons, and to avoid errors!!
$result = mysql_query($query); //RUN the query
//now, there are a few options:
echo mysql_num_rows($result);
//how many results did we get? if its >0, we know it exists, good for IFs
if ($row = mysql_fetch_assoc($result) { //if there's something to look at...
print_r($row); //show the output from that row, or:
echo $row['something']; //show one value
}
//for multiple results:
while ($row = mysql_fetch_assoc($result) { //go through all of the results
echo $row['something']; //show that result, among many
}
//of course, you'll only need one of those options, and there are others too...
?>
And just a note: never post your password (or username/hostname) on the forum here, for security reasons. It's the one part of your script we don't need.
Finally, you probably should actually be using mysqli, rather than mysql. It's just a difference in functions in PHP, but the mysqli functions are newer and more secure. Traq can say more on that. I've got a bad habit of still using mysql because that's how I learned it. You'll also find a lot more info (eg, tutorials) out there on mysql because it's been around longer, but since you're starting now you may want to start with the better of the two 
Regardless, my code above will more or less apply for mysqli, with a slightly different structure.
Bookmarks