Hi. Yaswanth Narvaneni wrote:
Hi! Is there a function (or a code snippet) in PHP for mysql password() function? I 'dont' want to use something like select * from table where table.passwd=password($passwd); Is there any other alternate way to do it?
Try this: <?php $mypassword="this is my password!!!"; $query=mysql_query("SELECT PASSWORD('$mypassword')"); list($mysql_pass)=mysql_fetch_array($query); mysql_free_result($query);unset($query); printf( "My password is "%s" and Its hash value ". "is "%s" computed by the MySQL PASSWORD() function", $mypassword, $mysql_pass); ?> You don't need a MySQL connection. Happy weekend. -- Gustavo Narea. PHP Documentation - Spanish Translation Team. Valencia, Venezuela. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php