How about something like:
<a href="/mail-to.php?email=hello@world.co.uk" title="Email hello@world.co.uk">hello@world.co.uk</a>
# mail-to.php
// Retrieve email address
$email = isset($_GET['email']) ? $_GET['email'] : false;
// Validate email address?
// Update database
if($email)
header("location: mailto:{$email}");
die('Invalid email address');
blocblue
Practically a Posting Shark
837 posts since Jan 2008
Reputation Points: 272
Solved Threads: 161
Skill Endorsements: 13
Put the HTML in your existing page and create a new PHP script containing the PHP code.
Then update the link in the HTML anchor tag to point to the correct location of the new script.
Don't just copy and paste.
blocblue
Practically a Posting Shark
837 posts since Jan 2008
Reputation Points: 272
Solved Threads: 161
Skill Endorsements: 13
The header statement would perform a redirect, hence your output wouldn't be visible on the destination page.
blocblue
Practically a Posting Shark
837 posts since Jan 2008
Reputation Points: 272
Solved Threads: 161
Skill Endorsements: 13
Question Answered as of 11 Months Ago by
blocblue
and
akmozo