Re: mail link problem with php echo statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






On Wed, March 22, 2006 10:29 pm, Mark wrote:
>
> How can i make this email from a database a hyperlink so it doesnt
> show the
> email address--i have tried many things but i keep getting errors. At
> the
> moment it just shows the email (no link)
> thanks
>
>
>
> <?php
> //get comp_id
> $query = mysql_query("SELECT * FROM comps WHERE name = '$comp_name'");
> $result = mysql_fetch_array($query);
>
> $comp_id = $result['id'];
> $joinfee = $result['joinfee'];
> $email = $result['email'];
>
> ?>
>
> Administrator email[<?php echo $email;?>]</td>

echo "<a href=\"mailto:$email\";>whatever</a>";


If you want to stop email harvesters, you can do:
$email = str_replace('@', '&#64;', $email);
echo "<a href=\"mailto:$email\";>whatever</a>";


-- 
Like Music?
http://l-i-e.com/artists.htm

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux