1- Remove \ from \$username and \$password..
2- If this does not work insert
echo 'username='.$username.'<br>';
echo 'password='.$password.'<br>';
lines right after
if ($action == "passwords") {
and see if the variables are set correctly before being processed (if not you may need to "globalize" them)
3- Your message would well fit in "Help me Finish" or "PHP" boards rather than requests..