if you have encrypted the password already, you're encrypting it again when you pull it from the db.
So, just pull it normal, encrypt the one they just typed, and compare those.
The change in your code would be (I think, if I understand you):
while($roc = mysql_fetch_row($mysql_stuff)){
$realpass=$roc[2];
if (PASSWORD($pass) == $realpass){
......