Micro Niche Builder
Closed Thread
Results 1 to 5 of 5

Thread: Encrypt string

  1. #1

    Default Encrypt string

    Hello

    I want to store encrypted password in mysql table while people register on my site. How can I encrypt password using php? Please help me regarding this.

    Thanks


  2. #2

    Default

    You can use md5 encryption for the encryption purpose. Hope following example will help you

    PHP Code:
    $str "test";
    $encrypted md5($str);
    echo 
    $encrypted
    thanks

  3. #3

    Default

    Yes code is workign fine and I have stored password in the table but I would like to know while checking the login how can I decrypt it?

  4. #4

    Default

    @nikon

    Just use md5($str) and compare it to with mysql data when you want to decrypt it too.

    Hope it helps, if you have any problem let me know

    Quote Originally Posted by nikon View Post
    Yes code is workign fine and I have stored password in the table but I would like to know while checking the login how can I decrypt it?

  5. #5

    Default

    To encrypt particular string you can use md5 algorithm of the php and you will get good result

Closed Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts