No, I’m sorry, I do not understand what you want. I’ll echo what I think you want:
I’m trying to write something with which users can get their ( and other peoples ) passwords.
Is that correct?
If so, then first you need to get the $pass out of the SQL query. ( People do not know it, so the query won’t return results )
[php]
$sql = “SELECT * FROM users WHERE mail=’$mail’, name=’$name’, code=’$code’, user=’$user’”;
mysql_query( $sql );
[/php]
Then you need to read the results the database returned to you. ( you may want some error-checking…maybe )
[php]
$record = mysql_fetch_assoc();
$pass = $record[‘pass’];
[/php]
now if you echo $pass in the right place in your document, you’ll get what you want… 
But…
Is this really what you want? It’s kind of an open door to peoples accounts ( I didn’t login, I have no account, I don’t know how ‘private’ information on the site is, but I can imagine it’s annoying when someone hijacks your account.)
I thinks a “Reset your password” mechanism that sends a temporary password by email to the user after which the user can login and reset their password is a lot ‘safer’. 8)
Hope it helped ;D