Frustrating problem with log-in script

From: Date: Mon, 07 Jul 2003 11:59:09 +0000
Subject: Frustrating problem with log-in script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-154172@lists.php.net to get a copy of this message
Hi, I' running a self-registration script. On the login page are 2 fields: 'username' and 'paswd'. The contents are checked against a db. New users must enter 'new' and 'user' into these fields and that will skip the db check and dump them into a registration page. On testing (after it worked fine last week) I find that new/user dumps me back into the login page (home.html). The code is ... <?php include("functions.php"); include("local.php"); $login=$url."home.html"; if(isset($_REQUEST["username"]) && $_REQUEST["username"]!=''){ $username=$_REQUEST["username"]; } else { header("Location: $login"); } if(isset($_REQUEST["paswd"]) && $_REQUEST["paswd"]!=''){ $paswd=$_REQUEST["paswd"]; } else { header("Location: $login"); } if( $username == 'new' ){ $new_u=$url."user_new.php"; header("Location: $new_u"); } $strSQL = "select * FROM user WHERE (Username='$username' AND Paswd='$paswd')"; $cur = odbc_exec( $conn, $strSQL ); if (!$cur) { Error_handler( "#1 Error in odbc_exec( no cursor returned ) ".$strSQL , $conn ); } ...... ?> Any suggestions? This is running on Win NT. Chers George

« previous php.general (#154172) next »