quick help
Posted by: Vojvoda (89.110.203.---)
Date: April 03, 2008 11:35PM

This is problem,

This is query on my registration page

$result = mysql_query ("INSERT INTO users (name, password, email, showemail)
VALUES ('$user', PASSWORD('$pass'), '$email', '$showemail')"winking smiley;

And this is query on login page

$result = mysql_query("SELECT * FROM users WHERE name = '$user'
AND password = PASSWORD('$pass')"winking smiley;

When i register i try to login on that acc and query return 0 results, if i use just this query

$result = mysql_query("SELECT * FROM users WHERE name = '$user'"winking smiley;

it's working fine

Someone Anyone smiling smiley

Options: ReplyQuote
Re: quick help
Posted by: toivo (---.nsw.bigpond.net.au)
Date: April 04, 2008 09:14AM

Hi,

The MySQL Reference manual recommends the MD5() or SHA1() functions to be used in applications, not PASSWORD() which is used internally by the MySQL Server - see [dev.mysql.com].

You could also use the same functions in PHP, for example md5() or sha1(), rather than getting the MySQL Server do the encryption, see [php.net].

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: quick help
Posted by: Vojvoda (---.ptt.yu)
Date: April 04, 2008 11:55AM

tnx

Options: ReplyQuote


Sorry, only registered users may post in this forum.