RE: [PHP] Trying to e-mail password

From: Date: Wed, 13 Nov 2002 03:05:53 +0000
Subject: RE: [PHP] Trying to e-mail password
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-124139@lists.php.net to get a copy of this message
If you want an email password feature, then just store it as plain text. If someone is able to get access to your database, that means they more than likely have access to the rest of your box, so your 'secret code' is worthless. ---John Holmes... > -----Original Message----- > From: rija [mailto:rija@vatu.com] > Sent: Tuesday, November 12, 2002 9:37 PM > To: php; Ben C. > Subject: Re: [PHP] Trying to e-mail password > > ENCODE(value, 'secret code') > DECODE(field name, 'secret code') > > to record > " ... VALUES ( ... blahblah, ENCODE('$passord', 'secret code', ... BLAH > BHAL") ; > > and to read the value > do like this > MYSQL_QUERY("SELECT DECODE(password, 'secret code') as password, id, BLAH > BLAH > > > ----- Original Message ----- > From: "Ben C." <benc@cox.net> > To: <php-general@lists.php.net> > Sent: Wednesday, November 13, 2002 12:07 PM > Subject: Re: [PHP] Trying to e-mail password > > > > Is there not any way to reverse the crypted password before e-mailing?? > > > > If not, how do I use ENCODE / DECODE? > > > > > > > > > > From: "rija" <rija@vatu.com> > > > Date: 2002/11/12 Tue PM 07:32:28 EST > > > To: "php" <php-general@lists.php.net>, > > > "Ben C." <benc@cox.net> > > > Subject: Re: [PHP] Trying to e-mail password > > > > > > You should do like this: > > > > > > $password = $row['password']; > > > This return weird crypted value of your password. > > > > > > Unless you want send the this weird password. The function > mysql_password is > > > irreversible, you cannot get back the value crypted by password. Use > ENCODE > > > and DECODE instead, > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ben C." <benc@cox.net> > > > To: <php-general@lists.php.net> > > > Sent: Wednesday, November 13, 2002 11:09 AM > > > Subject: [PHP] Trying to e-mail password > > > > > > > > > > I am trying to have a form that send a user their email and password > to > > > login. I am using the following: > > > > > > > > while ($row = mysql_fetch_array($result)) { > > > > $email = $row['email']; > > > > $password = $row['password(password)']; > > > > > > > > When I use the mail() function to send both $email and $password I > receive > > > an e-mail with a blank password. > > > > > > > > What am I doing wrong. Please help! > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: > > > > http://www.php.net/unsub.php > > > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#124139) next »