Login issues
Posted: Sat Jun 22, 2002 10:20 am
Hey,
Im taking my login script that uses sessions and converting it to MySQL instead of 2 variables within the script.
i get a parse error from login.inc.php
on line 23 which is
I think whats causing it is im not closing a bracket, but i cant seem to find it. Can you find the cause? heres the code:
Thanks,
Limb
Im taking my login script that uses sessions and converting it to MySQL instead of 2 variables within the script.
i get a parse error from login.inc.php
on line 23 which is
Code: Select all
?>Code: Select all
function user_isloggedin($name,$pass) {
if(isset( $name ) && isset( $pass ) && ($auth = "false")) {
mysql_connect($mysql_server, $mysql_user, $mysql_pass);
mysql_select_db($mysql_db);
$sql = "SELECT * FROM users WHERE user="$name" AND pass="$pass");
$result = mysql_query($sql);
$num = mysql_numrows($result);
if ($num != 0) {
return 1;
}
} else {
return 0;
}
}Limb