I have an image on my productspage.php that when clicked presents a WinZip.exe file for the user to run or save.
I also want that same click to send me an email , unknown to the person downloading the file, that tells me "Product X Downloaded"
I do not need the senders email details!
I have tried to find a solution though googling but can find nothing.
I have a php script that sends me such an email when the page is opened but cannot see how to combine this with the download action.
$email = $_POST['email'];
mail( "firstname.lastname@example.org", "product X free package", "product X free package page opened", "From: $email" );
print "THANK YOU FOR DOWNLOADING</br>";?>
1. Make link point to another page (saying your download will be starting shortly). This can be done with JS as well.
2. Top of the page have the mail function
3. then redirect to the winrar.exe download file using Header