Forum Moderators: coopster
<?php
$query = $_SERVER['QUERY_STRING'];
if ($query == '') {exit('ERROR: No query string found at end of web address!');}
if ($query == 'chris') {$address = '-my-email-address-here-';}
$link = 'mailto:'.$address;
header($link); //I also tried location:$link
?> The HTML would then look like this:
<a href="email.php?chris">email me!</a> I can't find anything in the online PHP Manual about this. Is it possible at all?
<?php
if(empty($_SERVER['QUERY_STRING']))
{
exit('ERROR: No query string found at end of web address!');
}
elseif($_SERVER['QUERY_STRING']=='derek')
{
$address = 'you@my-email-address.co.uk';
}if(!empty($address))
{
header("Location: mailto:".$address);
}
?>
I think the header location is needed to process the mailto request!
This code has been tester (that makes a difference for me) and it's a cool idea to reduce spambots grabbing e-mail addresses guess
Good luck
Del