RE: [PHP] Hash Issues
| From: | Tyler Replogle | Date: | Fri, 25 Feb 2005 23:58:34 +0000 |
| Subject: | RE: [PHP] Hash Issues | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-209473@lists.php.net to get a copy of this message | ||
Try doing the hash code after the password is posted
From: "Erbacher Karl" <erbacher@adelphia.net> To: php-general@lists.php.net Subject: [PHP] Hash Issues Date: Thu, 24 Feb 2005 08:26:35 -0800 Received: from lists.php.net ([216.92.131.4]) by mc5-f20.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 25 Feb 2005 09:30:44 -0800 Received: from ([216.92.131.4:11652] helo=lists.php.net)by pb1.pair.com (ecelerity HEAD r(5124)) with SMTPid 8D/AB-51537-5C06F124 for <dbnm@hotmail.com>; Fri, 25 Feb 2005 12:30:45 -0500 Received: (qmail 66774 invoked by uid 1010); 25 Feb 2005 16:28:10 -0000 Received: (qmail 48782 invoked by uid 1010); 25 Feb 2005 15:54:21 -0000 X-Message-Info: 6sSXyD95QpWP6+shjfuSKTd7f5bTEYxLS2AOsK0Gtko= Return-Path: <php-general-return-209357-dbnm=hotmail.com@lists.php.net> X-Host-Fingerprint: 216.92.131.4 lists.php.net Mailing-List: contact php-general-help@lists.php.net; run by ezmlm Precedence: bulk list-help: <mailto:php-general-help@lists.php.net> list-unsubscribe: <mailto:php-general-unsubscribe@lists.php.net> list-post: <mailto:php-general@lists.php.net> Delivered-To: mailing list php-general@lists.php.net Delivered-To: ezmlm-scan-php-general@lists.php.net Delivered-To: ezmlm-php-general@lists.php.net Lines: 22 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-Posted-By: 68.234.190.142 X-OriginalArrivalTime: 25 Feb 2005 17:30:45.0014 (UTC) FILETIME=[BC9C7360:01C51B5F] Hello, I'm trying to hash passwords before saving them to a mySQL database but I am having a problem. I created three seperate sample users with three different passwords (password1, password2, password3). When I go back to look at the table info in the database, it has saved the exact same hash value for all three users. Any ideas why this might be happening? The script is very straight forward.The form that collects the data: <input type='password' name='password'> $pass=bin2hex(mhash(MHASH_SHA1, $password)); <input type='hidden' name='pass' value='$pass'>The file that verifies the data and stores it to the database: $pass=$_POST['pass']; INSERT INTO table (username, password) VALUES ('$logname', '$pass');Thanks, Cat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php