Thanks to both Vincent and Jaykay for getting me on the right track. I am still having a slight problem though. If I input the correct "login" then the "member_name and pswrd" print statements are executed, despite any incorrect pswrd. Now, if I input an incorrect "member_name" the else statement is never executed. Any suggestions.
$link = mysql_connect( "localhost", $user, $pass );
if ( ! $link )
die ( "Couldn't connect to MySQL" );
else
{
mysql_select_db( $db, $link )
or die ( "Couldn't open database $db: ".mysql_error( $link ) );
$a_query = "SELECT * FROM ismembercmp WHERE member_name = '$cl_name' AND PASSWORD( pswrd = '$cl_pswrd' )";
if ( !$result = mysql_query( $a_query, $link ) )
{
print "SQL query failed:";
print mysql_error( $link )."<br>";
print $a_query."<br>";
}
else if ( mysql_num_rows( $result ) > 0 )
{
print mysql_result($result,0,"member_name");
print "<br>";
print mysql_result($result,0,"pswrd");
}
else
{
fopen ( "http://localhost/jotr/comp_lgn_error.html", "r" );
}
mysql_close( $link );
}