new_england Posted January 22, 2009 Share Posted January 22, 2009 Can anyone help me make the below php to make this a <a=href=mailto link? Thanks <td align="left">' . $row['email'] . '</td> Quote Link to comment https://forums.phpfreaks.com/topic/141881-adding-a-mailto-link/ Share on other sites More sharing options...
.josh Posted January 22, 2009 Share Posted January 22, 2009 echo '<td align="left"><a href="mailto:' . $row['email'] . '">my email</a></td>'; Quote Link to comment https://forums.phpfreaks.com/topic/141881-adding-a-mailto-link/#findComment-742849 Share on other sites More sharing options...
new_england Posted January 22, 2009 Author Share Posted January 22, 2009 I did this and this worked, but it shows the link as E Mail and not the actual email address which is what I am trying to accomplish, but this is what worked for me. Can you help me modify it to show the email address? <td align="left"><a href="mailto:' . $row['email'] . '">E Mail</a></td> Quote Link to comment https://forums.phpfreaks.com/topic/141881-adding-a-mailto-link/#findComment-742855 Share on other sites More sharing options...
Philip Posted January 22, 2009 Share Posted January 22, 2009 echo '<td align="left"><a href="mailto:' . $row['email'] . '">'.$row['email'].'</a></td>'; Quote Link to comment https://forums.phpfreaks.com/topic/141881-adding-a-mailto-link/#findComment-742858 Share on other sites More sharing options...
.josh Posted January 22, 2009 Share Posted January 22, 2009 wtb people with common sense. Opening bid: $0.02 Quote Link to comment https://forums.phpfreaks.com/topic/141881-adding-a-mailto-link/#findComment-742859 Share on other sites More sharing options...
new_england Posted January 22, 2009 Author Share Posted January 22, 2009 Excellent... thanks, problem solved... Quote Link to comment https://forums.phpfreaks.com/topic/141881-adding-a-mailto-link/#findComment-742874 Share on other sites More sharing options...
haku Posted January 22, 2009 Share Posted January 22, 2009 If you put that on your site, every email address you list is going to get spammed to hell once a bot finds your site. You should try to never post email addresses in code that gets sent to the browser. Quote Link to comment https://forums.phpfreaks.com/topic/141881-adding-a-mailto-link/#findComment-742928 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.