PDA

View Full Version : server-side email link redirects



sniperman
07-23-2009, 01:24 PM
Shame on me for not knowing this already but how do i redirect


<a href="mailto:email@address.com">email</a>

so that the email is processed in PHP and redirected to the relevant application.

I would like to enhance security and keep spammers away. I don't need a PHP form. I just need the link to execute a PHP function like mail()

JasonDFR
07-29-2009, 10:15 AM
Normally hyperlinks with email addresses in the href attribute will cause an email application to launch on the user's computer filling in the To: field with the email address from the link.

If you want to leave the html link as is but make it behave differently, you'll need to use javascript.

If you want PHP to email you, you'll need to create a contact form that POSTS the contents of the form to a php script that in turns sends the email.

If you want more info or perhaps I'm not understanding exactly what you want to acheive, let me know.