I don't think relying on JavaScript for something so integral as an email
address it THAT good an idea...

Use php to send a mailto: header!  I have a mail.php file, which I call with
a link like:

<A HREF="mail.php?to=justin&domain=indent.com.au">Justin</a>

and mail.php is a simple file:

    $_GET['to'] = "info";
    $_GET['domain'] = "indent.com.au";
$to = $_GET['to'];
$domain = $_GET['domain'];
$email_address = $to."@".$domain;
header ("Location: mailto:$email_address";);

It's got a default domain and user in there (so the script can be called
with just the to or domain, or neither specified), and since no HTML or
content is pumped into the page at all, the originating page doesn't refresh
or anything... it just pops open my mail client the same way a standard
email link would.

Put mail.php in your doc root and give it a try -- works fine on every
browser I've been able to test on.

Justin French
Creative Director

on 14/06/02 7:02 AM, Manuel Lemos ([EMAIL PROTECTED]) wrote:
> I had that problem and the solution that I used was use Javascript in
> the ONCLICK event of the dynamically construct the link URL with static
> values that are hard to figure that they represent an address by spam
> harverster bots. Look at the bottom of the pages here for an example:
> http://www.phpclasses.org/

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to