I'm currently working on this page: http://www.mlhogan.com/ectourdates/bandlisting.php
I'm trying to turn the Recommend This Site feature from JavaScript to PHP. I know how to send the email, however I'm having a hard time trying to figure out how to either a) execute the PHP code without leaving the page, b) redirect the user to the page they just came from (ie. if they sent the email from the bandlisting.php page then go back there) or c) include the URL of the page they came from so that I can include it (rather than re-direct).
Basically I want to be able to send the email without taking the user away from the page they were on. Is this possible?
How could I grab the URL of the current page and store it in a variable?
Cheers,
Melissa :o)