Re: encrypting passwords, how to decrypt?

From: Date: Fri, 18 Jan 2002 18:27:42 +0000
Subject: Re: encrypting passwords, how to decrypt?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-82065@lists.php.net to get a copy of this message
hwk@barrysworld.com (Hawk) wrote in <20020117205403.72823.qmail@pb1.pair.com>: Hi Hawk, Here is a snippet of what I use: if (isset( $txtUsername )) { $sql = "Select a.* from admins a where "; $sql .= "adm_name = '$txtUsername' "; $sql .= "and adm_pwd = PASSWORD('$txtPassword')"; $resultID = mysql_query( $sql ) or die("Error in Query: $query " . mysql_error()); $row = mysql_fetch_assoc( $resultID ); $num = mysql_num_rows( $resultID ); if ( $num != 0 ) { $auth = true; session_start(); session_register("Admin_ID"); session_register("Admin_Name"); session_register("is_auth"); $Admin_ID = $row["AdminID"]; $Admin_Name = $row["adm_name"]; $is_auth = $auth; } mysql_free_result($resultID); } if ( ! $auth ) { error_reporting($err_lvl); $is_auth = $auth; header("Location:logon.php"); exit; } else { header("Location:adminindex.php"); exit; } ?> Hope this helps. Chris

« previous php.general (#82065) next »