You are here: Re: Stop user access « PHP Programming Language « IT news, forums, messages
Re: Stop user access

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация