On Mon, Mar 19, 2001 at 10:06:52PM -0800, Toke Herkild wrote:
I've written this login rutine
But that doesn't work... I've tried to use mysql_num_rows too but I still
get :
bWarning/b: Supplied argument is not a valid MySQL result resource in
bg://web/herkild/html/loginout.php/b on line b113/bbr
if ($ACTION == 'Login') {
$query = "SELECT user.ID FROM user WHERE ";
$query .= "user.brugerID = $LoginBrugerID AND ";
$query .= "user.kodeord = $LoginKodeord;";
$mysql_result = mysql_query($query, $mysql_link);
(line 113 ) if ($row = mysql_fetch_row($mysql_result)){
setcookie("Herkild_Domain", $row[0]);
Logged_in();
}
else {
wronguser();
}
}
It looks like you might be missing some quotes in your query. After you
call mysql_query(), call mysql_error($mysql_link); It will show you
your error in your query.
--
Jason Stechschulte
[EMAIL PROTECTED]
--
There are still some other things to do, so don't think if I didn't fix
your favorite bug that your bug report is in the bit bucket. (It may be,
but don't think it. :-) Larry Wall in [EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]