@kackah - This is an example of what I've done that is similar.
ConnVars.inc - is the connection variables for the LOGIN.PHP
CODE
<?php
$auth_host = "localhost";
$auth_user = "str_auth"; // what ever ID you want to use
$auth_pass = "";
$auth_dbase = "strikers"; // what ever DB you want to connect to with the above info
?>
The above $auth_user would be an account created specifically for use from the web. It should have ONLY select access, and your server should be setup not to allow access to the INC file type. That's my opinion.
LOGIN.PHP - actually processes my login.
CODE
<?php
include "ConnVars.inc";
$USERID = $_POST['CHARID'];
$USERPW = $_POST['CHARPW'];
$LookupCon = mysql_connect($auth_host,$auth_user,$auth_pass);
$Lookupdb = mysql_select_db($auth_dbase,$LookupCon);
$query = "SELECT * FROM account WHERE username='$USERID';";
$LINKLIST = mysql_query($query) or die(mysql_error());
$COUNTER = mysql_num_rows($LINKLIST);
$LINKDATA = mysql_fetch_row($LINKLIST);
if($COUNTER == 1)
{
if($LINKDATA[1] == $USERPW)
{
$response = "step01.html";
}
else
{
$response = "failed2.html";
}
}
else
{
$response = "failed1.html";
}
header("Location: ".$response);
mysql_close($LookupCon);
?>
I have setup other logins (just not this one) to catch whether I have MORE than one identical user name in the DB, by using the "$COUNTER = mysql_num_rows($LINKLIST);".
Which means "I" screwed up and didn't verify the account name during the creation process.