I am working on a project at the moment in wordpress and I need a php script that sends an email to the admin (me) when a user clicks on a button (that redirects to the script) I was hoping the email could send the following data to the admin:
- username
- the post or URL in which this user was on when they clicked on the button
I have been looking for a plugin for hours and have searched for script everywhere, I’m not exactly the best coder and appreciate the help.
Here is a PHP snippet that should send you the page and the information about the user.
You may need to install the WordPress PHP addon to insert this code.
https://wordpress.org/plugins/insert-php/