We need to track some PDF files we are allowing visitors to download from our website.
The files are listed out on a page that requires them to be logged in to access them. The download page tracks the visitor with sessions after they've logged to get into the download area. That login/access process is working so far using PHP and a MySQL database.
What I need to learn to do now is to be able to have an email sent out to a member of our sales/marketing department each time someone downloads a PDF file. They need to know the person's name, email, and the name of the file being downloaded, so they can followup with the visitor to see if they need additional help or information about the downloaded file.
I assume I'll need to process this through some type of a form and action file (like process_download.php) so that the database is updated with the file name(s) they're downloading, and their name and email are processed to send an email, and then redirects the visitor to a new page or tab for the PDF to be displayed so they can save it (download locally).
Does anyone know how I can make this all happen on my download page? I am not sure how to pass-on the original login information from the database (fullname and email address), and add the file name being downloaded to the PHP (mail) function. You probably guessed that I am new to PHP and I'm trying to learn as I go.
Thanks in advance for any help or direction.