-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

You can do this:

Encrypt a passowrd before insert into db using $var =
md5('your_password'); and insert the $var into your pass field into
your db.

To verify the password, get the pass entered by user and do
$md5('user_pass') and do a select into your db like this:

SELECT user, ip FROM your_table WHERE user = '".$user_entered."' AND
pass = '".$md5('user_pass')."';

if this select return a row, the user pass is valid. If not, this is
not valid. And your password are encrypted! :)

[]īs

Lomanto, Paulo H.

- -----Mensagem original-----
De: Pedro M. S. Oliveira [mailto:[EMAIL PROTECTED]]
Enviada em: quarta-feira, 25 de abril de 2001 16:01
Para: PHP db
Assunto: [PHP-DB] Password field!


Hello all!
i was wondering if any1 of you could help me with something.
i have a table with 3 fields user_ip, user and pass.
how can i encript the pass and then read compare it with a pass
inserted on the web page?
thanx


*******************************************
Pedro Miguel Silva Oliveira
Cell Phone: +351 96 5867227
SMS: [EMAIL PROTECTED]
Email: [EMAIL PROTECTED]


-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBOuckBZyz9Qg5WP+kEQITSQCguN65L93RIeqmynzoV8uMArXinJEAoIPQ
WiDfcwq/ZJXTvDPPL6Xm3zwt
=jwsZ
-----END PGP SIGNATURE-----


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to