Re: Encrypting passwords in a flat file before import

From: Date: Wed, 09 Oct 2002 13:37:24 +0000
Subject: Re: Encrypting passwords in a flat file before import
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-119428@lists.php.net to get a copy of this message
If you don't need the file to be changed to contain md5 encrypted passwords use *fgetcsv() *to read the contenta, then use *md5()* on the password and insert it into database using mysql_query. No need to write a new file. Verdon Vaillancourt wrote:
Hi, I hope this question isn't too basic... I have a flat file (CSV) that I want to import into a mySQL db via phpMyAdmin. The file has about 1200 rows and is in a format like: "value","value","password","value","value","etc" The passwords are in clear text. I need them to be encrypted in md5. Is there any advice out there as to how I could process this flat-file before I import into my db or after the fact? Thanks, verdon Ps. Please cc me if replying to list as I am on digest mode


« previous php.general (#119428) next »