php – md5

md5

(PHP 4, PHP 5)

How i can encrypt a password in database ? , so that no one can see password in phpmyadmin
Solution:
Hi you can encrypt a string (password) using mdf function in php and store it in database
here is the code to do that
<?php

if($_POST[‘submit’]==”yes”) // if some one submit a form you will get this value
{

mysql_query(“insert into users(username,password,email) values(‘”.addslashes($_POST[‘form_name’]).”‘,'”.md5($_POST[‘form_password’]).”‘,'”.addslashes($_POST[‘form_email’]).”‘)”);

// in the above query you are saving data into database and you can see coder used md5 function on password that will encrypt the password so that no one can see it
}
?>

=============================================================

md5 — Calculate the md5 hash of a string

Description
string md5 ( string $str [, bool $raw_output] )

Calculates the MD5 hash of str using the » RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash. The hash is a 32-character hexadecimal number. If the optional raw_output is set to TRUE, then the md5 digest is instead returned in raw binary format with a length of 16.

8 Comments »

  1. Jack said

    is it possible to decrypt it?

  2. Thank you for sharing your info. I really appreciate your efforts and
    I am waiting for your further write ups thank you once again.

  3. Greetings Google works great for me but your web site is
    running steadily which actually took approximately a few minutes to finally load, I’m not sure whether or not it’s my own problem or maybe your
    web site problem. Nevertheless, I have to say thanks for putting
    amazing blog post. I guess it really has already been necessary to lots of people .

    I personally must say that you really have done brilliant work with this and also hope to
    find out more awesome content from you. To obtain more understanding through content that you publish, I actually have saved to
    bookmarks this url.

  4. Howdy I don’t know whether it’s me or maybe your web page but it is loading
    slowly , it took me for a couple of minutes to finally load although digg works perfectly .

    Anyway, I appreciate you for posting such a fabulous blog post.
    I think it has already been incredibly beneficial to user who seem to
    click here. I really hope I will be able to find even more remarkable things and I
    should certainly flatter your site by saying you’ve done fantastic writing.
    Right after checking out the article, I’ve book-marked your site.

  5. Barrett said

    Hello there Yahoo works perfectly in my situation however your
    web site is starting steadily which actually had taken around one minute to load,
    I am not sure whether or not it’s my own issue perhaps website
    problems. Anyways, I have to thank you very much
    for placing brilliant content. I’m sure it really has been honestly beneficial to user who seem
    to click here. I personally need to say that you have done brilliant work with this as well as
    expect to see even more awesome content through you. To get additional knowledge
    through articles that you post, I actually have saved
    this page.

  6. Myles said

    I don’t know whether or not it’s me or maybe your internet
    site but it’s starting incredibly slow , I had to spend like a moment
    in order to load up but facebook does work properly
    for me. Well, Thanks for posting an incredibly excellent article.

    I suppose this has been useful to lots of individuals who came on this page.
    I am hoping I’ll be able to find more remarkable content
    and I also should complement you simply by saying you have done good
    writing. Soon after viewing the blog post, I’ve book marked your webblog.

  7. Heya I’m not sure whether it’s me or perhaps your website but
    it is starting slow , I had to spend like a few minutes to successfully load up and yet gmail operates totally
    for me. Anyways, I am going to say thanks for including excellent
    blog post. I’m assuming this has been helpful to lots of people who arrived at this point.

    I really hope I’ll be able to find even more incredible content
    and I also should complement you by stating you have done fantastic job.
    I have got your site book-marked to see new stuff you post.

  8. Hey! Your site is running lagging , that consumed just
    like a moment to successfully load, I personally do not know whether it’s just me
    or your website on the other hand google worked acceptable for me.
    On the other hand thanks for posting great articles. I suppose this has already been helpful to lots of individuals who
    arrived at this point. I must say that you really have done excellent job with this plus wish to find
    many more great stuff through you. To get additional knowledge from posts which you publish,
    I’ve bookmarked this url.

RSS feed for comments on this post · TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: