PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
function Encrypt($string) {//hash then encrypt a string
$crypted = crypt(md5($string), md5($string));
return $crypted;
}
?>
and I want to unencrypt strings from a mysql database crypted with this function. how would I do that? For example, I have a login script that crypts the username and password, but to retrive the username to sort a table with a mysql query would be impossible becuase all I know is the username and not the crypted string!
Thanks Roja, and yes, dull, I went everywhere looking, and I'm trying to retrive the username without the person logging in for a news updates site so I can see who posted the message. And no, I'm not stoopid (sic)
i was just kidding, i was just implying that you would be stupid to process your login script with GET, i was not trying to call you stupid....just sayin