| 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
 [Back to original message] |