$pass="hello"; $pass=crypt($pass);
this is an example of the crypt function, but i wanna know what i have to do for decrypt the variable $pass if anyone know how do it, please reply
Crypt is one way. If you use the same salt with the same string you'll get the same return (say, for password verification) but there isn't a method for decrypting a crypt() function.
crypt is one-way, you can't decrypt. You can use the mcrypt library for symmetric encryption. What are you encrypting and are you sure you want to?
if i use the encryptation for a password that i have encrypted in a database, and for example, some user forget his password, he need the password by mail, how can i show him the password NOT crypted?
You assign a random password and e-mail it to them. Of course your site should have a way for users to change it to something else if they want.
excelent i have the password crypted, the user put that password, how can i compare the password with the crypted password? i have to crypt the password and compare with the crypted password?
Right. Make sure to use the same seed.