SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    masquerading Nick's Avatar
    Join Date
    Jun 2003
    Location
    East Coast
    Posts
    2,215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    calling a password, won't decrypt

    I am trying to call a password from a table, and decrypt it (md5) how the user can easily edit it. Here is some of the code I have tried:

    PHP Code:
    $Query "SELECT * FROM users WHERE username='$_COOKIE[username]'";
        
    $Result mysql_db_query ($DBName$Query$Link); 
        
    $pass md5($Row['pass']);
        while (
    $Row mysql_fetch_array ($Result)) {
            echo
                
    '
            <form action="user.php?do=2" method="post">
                <input type="password" name="pass" value="'
    .$pass.'"> | Password <br /> 
    But that does not work, still shows up md5 encrypted. I have tried other things, too, but none of them work

  2. #2
    SitePoint Member
    Join Date
    Nov 2003
    Location
    Toronto
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    md5 works only in one direction. So if your password is alredy encrypted on the table you can not get it back in plain text...

  3. #3
    masquerading Nick's Avatar
    Join Date
    Jun 2003
    Location
    East Coast
    Posts
    2,215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    doh.

  4. #4
    PHP manual bot bronze trophy Gaheris's Avatar
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, the md5 function creates a hash. Just give the user the possibility to have a new passwort generated and sent to his email adress.


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
  •