Re: script not allowing login after generating new password
| From: | Cam Dunstan | Date: | Mon, 03 Feb 2003 23:35:44 +0000 |
| Subject: | Re: script not allowing login after generating new password | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-18341@lists.php.net to get a copy of this message | ||
There`s no such thing as a stupid question - unless of course we are trying
to dramatically reduce the number of posts on this list.
Jim, just echo the password before and after it gets inserted and
before/after comparison and you`ll soon see where you going wrong.
Echo - the greatest debugging tool of all.
----- Original Message -----
From: "Svensson, B.A.T. (HKG)" <B.A.T.Svensson@lumc.nl>
To: "Beach, Jim" <jbeach@incog.org>; <php-windows@lists.php.net>
Sent: Tuesday, February 04, 2003 2:50 AM
Subject: RE: [PHP-WIN] script not allowing login after generating new
password
> Stupid question: Are you returning the encrypted string to the "user"?
>
> > -----Original Message-----
> > From: Beach, Jim [mailto:jbeach@incog.org]
> > Sent: Monday, February 03, 2003 4:46 PM
> > To: php-windows@lists.php.net
> > Subject: [PHP-WIN] script not allowing login after generating new
> > password
> >
> >
> > Hi, I'm new in this list and to PHP and MySQL. I'd welcome any help you
> > can give.
> >
> >
> >
> > I'm working on a simple application where a registered user submits a
> > "forgot my password" form. The script is supposed to generate a random
> > new password, write it to the database, and send it to the user. Then
> > they can log in with the new password and they're off and running.
> >
> >
> >
> > Here's what happens now: The password generator works fine - it creates
> > a random string any length I want. The password field in the database
> > gets changed - not to the new random string but apparently to an
> > encrypted version of it via the MySQL password() function. The script
> > returns the user a notice of the new password. BUT, login with the new
> > password fails!
> >
> >
> >
> > I'm reluctant to ask you to do my debugging but I'm almost brain dead
> > after hours of trying to figure this out. Can someone suggest where I
> > might look for the problem? I'll include my scripts in a reply if
> > needed.
> >
> >
> >
> > Thanks very much in advance.
> >
> >
> >
> > Jim
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>