|
Posted by Pedro Graca on 10/13/06 01:17
Garry Jones wrote:
[...]
> So here I assign $user to the table data scfmnum is the same as the user id
> given by user
>
> $user = mysql_query("SELECT * FROM scfmforening WHERE scfmnum =
> '$scfchknum'")or die(mysql_error());
>
> // now the tricky bit that I dont really understand. It should check
> password match.
Are you sure the resource $user points to something with exactly 1
element?
if (($numrows = mysql_num_rows($user)) == 1) {
> while($info = mysql_fetch_array($user) ) {
> if ($scfchkpwd != $info["scfpwd1"]) {
> die('Wrong userid or password!');
> session_destroy();
> }
> else {
> echo "yes";
> }
> }
} else {
echo 'query returned ', $numrows, ' elements.';
}
You might want to increase the error reporting level of PHP.
Add
error_reporting(E_ALL);
to the top of your script, right after the first <?php tag.
--
File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot
Navigation:
[Reply to this message]
|