Forum Moderators: coopster
function logincheck($uid, $upwd) {
if (($uid == "") ¦¦ ($upwd == "")) {
$accountok = false;
} else {
$sql = "select * from users where userid = $uid and password = '$upwd'";
$result = mysql_query($sql);
$numrows = mysql_num_rows($result);
if ($numrows > 0) {
$accountok = true;
} else
$accountok = false;
}
}
return $accountok;
}
--------------------
RS
If you are passing POST data via a form, you need to use the $_POST superglobal array. You can read up on them here:
[uk2.php.net...]
So, assuming your $upwd is coming from a form, you can use something like:
function logincheck($uid, $_POST['upwd'])
dc
This will cause yo to receive a "Notice" whenever you try to use the value of an undefined variable. Since you have register_globals off, any variables that are coming from the form will be undefined and you'll get a notice.
TQ