Here are the examples of what I'm looking for:

A user tries to login but has forgotten their password. From a fprgottten
password link,They enter their email address and submit . The server
automatically forwards their password to the email address on file in the
database.

scenario 2: A user wants to sign up a member for your service at a retail
location. To simplify the process, they can register at the retatiler by
simply giving the retailer an email address to submit to your database. When
the email address is inserted in to the database an email is automatically
generated and sent to the address they gave you with a link for them to go in
and complete the registration process from their home.

Is this done with a MySQL function from the database or is it generated from
within the browser?

Thanks in advance.

Greg Noss