getButterfly Logo getButterfly code wrangling since 2005

I’ve recently messed up a script installation and the admin user and password did not import successfully into the database. I have inserted the admin user manually, but I had no idea what the password looked like using md5 encoding. So I wrote a simple script creating an encoded password, and I imported the resulting value into the database. Pretty simple. The script is the following:

$a = md5(‘password’);
echo $a;

It will print an alphanumeric encoded string which can be inserted in any database table.

What is MD5? (Wikipedia)

Subscribe to getButterfly Blog

Once a week or so we send an email with our best content. We never bug you, we just send you our latest piece of content.

If you found any value in this post, agree, disagree, or have anything to add - please do. I use comments as my #1 signal for what to write about. Read our comment policy before commenting! Comments such as "Thank you!", "Awesome!", "You're the man!" are either marked as spam or stripped from URL.

Leave a reply

Love programming?

Learn about the most amazing things. Get smarter everyday!