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

Posted by Garry Jones on 10/12/06 23:22

Thanks Mark.

I tried to adapt your code for my needs but something is misfiring and its
not allowing me into the page. I removed the session variable thing as I
have no need for them.

// the post with the user id
$scfchknum=$_POST['scfchknum'];

// the post with the user password
$scfchkpwd=$_POST['scfchkpwd'];

include("connect to datbase php segment");

// my table is called scfmforening,
scfmnum is the field name with the user id number
scfpwd1 is the field name with the password

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.

while($info = mysql_fetch_array($user) ) {
if ($scfchkpwd != $info["scfpwd1"]) {
die('Wrong userid or password!');
session_destroy();
}
else {
echo "yes";
}
}

The page is not loaded correctly, roughly the sort of blank looking error as
when you omit a bracket or a semi colon.

Any ideas?

Garry Jones
Sweden

 

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

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