derekbelcher Posted April 24, 2009 Share Posted April 24, 2009 I have a table that displays the name, some info, and an email address of all members. This is done in php with a sql database. What I want to do is make the information that is stored in the email field linkable (like a mailto: in html). Here is the code that is used to display that info: echo "<td><div align='center'>" . $row['email'] . "</td>"; What do I need to add so that it becomes a clickable link capable of emailing? Thanks. Link to comment https://forums.phpfreaks.com/topic/155505-solved-how-do-i-make-the-data-from-this-field-a-hyperlink/ Share on other sites More sharing options...
mtoynbee Posted April 24, 2009 Share Posted April 24, 2009 echo "<td><div align='center'><a href=\"mailto:" . $row['email'] . "\">" . $row['email'] . "</a></td>"; Link to comment https://forums.phpfreaks.com/topic/155505-solved-how-do-i-make-the-data-from-this-field-a-hyperlink/#findComment-818256 Share on other sites More sharing options...
radi8 Posted April 24, 2009 Share Posted April 24, 2009 <?php echo "<td><div align='center'><a href=\"mailto\:" . $row['email'] . ">".$row['name']."</td>"; ?> Link to comment https://forums.phpfreaks.com/topic/155505-solved-how-do-i-make-the-data-from-this-field-a-hyperlink/#findComment-818257 Share on other sites More sharing options...
premiso Posted April 24, 2009 Share Posted April 24, 2009 echo "<td><div align='center'><a href='mailto:" . $row['email'] . "'>" . $row['email'] . "</a></td>"; A simple hyperlink. You may want to look into learning some basic HTML. Link to comment https://forums.phpfreaks.com/topic/155505-solved-how-do-i-make-the-data-from-this-field-a-hyperlink/#findComment-818258 Share on other sites More sharing options...
derekbelcher Posted April 24, 2009 Author Share Posted April 24, 2009 Thanks everyone. I just didn't have my quotes in the right place. Link to comment https://forums.phpfreaks.com/topic/155505-solved-how-do-i-make-the-data-from-this-field-a-hyperlink/#findComment-818261 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.