help with emailing forgotten password

I have a user login page with a link for a forgotten password. I have tested all login actions and they work fine. But, when a user forgets a password and enters thier email address, the password is never sent to them. I have checked with my host and they do support PHP emails to user so the problem must be in the code. HELP!!!
Code:

[php]

<?php // start advanced login form if ($_GET['action']=='forgot') { echo "nt"; echo "

If you forgot your password, enter the email address for your account. Your password will be immediatelly emailed to you.

nt"; echo "
nt"; echo "nt"; } else { echo $checkinbox; echo $sperralert; echo $notlogged; if ($logtry>0 && $logtry<$maxlogintrys) {echo '
You have '.($maxlogintrys-$logtry).' login trys';} echo "nt"; echo "

Login:

nt"; echo " Username
nt"; echo " Password
nt"; echo "remember your username on this coumputer?
nt"; echo "nt"; echo "forgot password?ntnt"; } // end advanced login form ?>

[/php]
:x

– MOD EDIT - ADDED PHP TAGS FOR EASIER READING -

Am I missing something??

Where is the code that pulls the password from the database and the code that actually sends the information?

More so the code that does the emailing.

mail() function is used for sending emails via php. http://www.php.net will provide more information on this.

Sponsor our Newsletter | Privacy Policy | Terms of Service