William Stokes wrote: > Hello, > > I have a system that uses certain id info. This info is stored in a session > cookie in MD5 format. At certain parts of the code I need to update or > insert to MySQL DB with that id info value in cleartext. Is this possible? > > If so, how to put this to a sql query? > > $sqlquery = "insert into x_table (team_id,number,) values > ('$team_id','$number') > > $team_id is the MD5 formatted cookie value and I need to put it to the > x_table column team_id in cleartext. > > Thanks a lot > -Will Any information that you wouldn't want in the script in plain text, you probably don't want in the database in clear text. Moreover MD5 is a one way hash and although it is broken, you probably don't want to spend the processing time needed to reverse it. Instead, I would just suggest that you try to use the hashed value of the id for whatever purpose you need. If you show some code that relates to how you need the id then maybe we can suggest to you how you can do that. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
Attachment:
signature.asc
Description: OpenPGP digital signature