[Wolves] php problem

Jon Farmer jonfarmer at enta.net
Fri Feb 27 14:01:56 GMT 2004


Wayne Morris wrote:
> Can someone have a look at the script below - its bugging the hell out
> of me and I've spent hours on it:
> 
> Basically its a simple login in script and it works if you use only one
> email address whilst browsing the net, if you have more than one email
> address in use it ferks up.
> 
> What should happen is that $email and $passwrd are read into a text
> input box, they are compared against a mysql database for verification,
> then the session starts.
> 
> The problem seems to be if you wish to switch users, the second time
> around the $email field entered into the text field is ignored and it
> uses the previous one entered (which it seems to get from autocomplete?)
> and it will log you in if you use the first users password,
> ie 
> User1 Pass1  - log in to User1 account
> User2 Pass2  - incorrect passworf
> User2 Pass1   - log in to User1 account

Change

$email = trim( $email );
$passwd = trim( $passwd );

To

unset($email);
unset($passwd);
$email = trim($_POST["email"]);
$passwd = trim($_POST["passwd"]);

Regards

Jon


-- 
Jon Farmer
Senior Systems Developer
Entanet International Ltd
Tel: +44 (0)1952 428969
Mob: +44 (0)7017 429590
SMS -> Email 07986200312 Prexif SMS With JF
www.enta.net




More information about the Wolves mailing list