Creating an encrypted login page in php


The Super Pimp of GF
Does anybody know how to create a login page in php where the passwords are encrypted and there is an admin and regular user account and the admin can access user and admin pages where as the user can only access the user pages? Thanks in advance