You can send an email through PHP, but most of the answers on SO saying "use the mail() function" are outdated I presume and, in any case, do not work.
In the PHP file, you read the email (for example, via $_POST['email']). Then you run a SQL query to retrieve the password WHERE the email is equal to the one you just read.
Finally, since you now have the password stored in a variable, you continue in your PHP file and use PHPMailer's function, as shown in examples like the following: https://github.com/PHPMailer/PHPMailer/blob/master/examples/mail.phps. Alternatively, you could use a similar library to achieve the same functionality.
Then you put the password in your email text and send it to the user.
However, a note of caution: it would be very unwise in terms of security to send passwords in plain text format (not encrypted) to a user's email address. I would advise you to send them an email with a password reset link instead, which would direct them to a form where they could select a new password and confirm it. That would require a different PHP file, where you would execute an UPDATE query to change the password that is stored in the database.
I assume you have already solved your problem, since this is an old question, but maybe this will help someone else who stumbles upon it.
Why do you need to access the data from the SQL table? Is this a password recovery type of form? If so, that can also be done with php. However, given that this is a Q&A help site and not a forum, I would hire a developer.
This link can help with accessing a mysql database from php.
This link can help with sending php email.
This link can help with sending html based email from php.
You may want to investigate AJAX via jQuery.
If you do not mind navigating away from the interface page, an HTML form would work.