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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php