0

Hello everybody,

for my application I want to implement a email-clickcounter, next to link-clickcounter. Most links and emails (mailto:) appear on a page that gives details about a search-result from my home-made searchmodule. I have set up the counting system like this :
Every link is redirected to a click.php-file. In the redirecting url I have appended an id, a reference and a target :
- The id tells the script which id in the mysqli-table needs to be updated.
- The reference tells the script which table to use to update .
- The target is the url that I use in the header("Location:...)-function to redirect.

This works for the links, but not for the email-adresses I'd like to send. The click gets registrated, but the email form is not opened. I know the header()-function is not the right way, but I don't know what IS the right way.
Can somebody help me out on this ?
Thanks, much appreciated ...

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Geertc
0

My guess is that what you are trying is just not possible, because you can't redirect from a server (where the PHP script is) to a workstation ( where the email client is). You should probably replace the "mailto:" idea with a little form to capture the subject and message, and then you can write a script to send the email and update your database.

0

Thank you for the reply, NettSite !
I'm still working on 'localhost' for the moment, and I think I made a mistake in my code, the other day. Now it is possible to redirect and than open the email.
If the code is not working on a live server, I'll use the solution you just brought up.
Thanks for the tip, It is much appreciated !

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.