It is easy u may just say<?phpinclude("db.php");/*Just fetch a new password for the person*/$rand=rand(0,100);$email='user@mail.com';$data=mysql_query("UPDATE user SET password='$rand' WHERE email='$email');mail($email,"Your Forgotten Password","Your forgotten password for e.g www.nextnaija.com is $rand Keep it safe","From: admin@nextnaija.com");?>Dats all enhance it with your forms you should be able it is just a hint