Moron Posted July 23, 2007 Share Posted July 23, 2007 I have a "mailto:" link displaying through php: echo "<a href=\"mailto\: hername@organization.org\">"; echo $RESULTEQAB['EmailAddress']; echo "</a>"; .... but instead of it being a simple "Mailto:" link, it's linking to a fullblown URL: http://www.organization.org/folder/subfolder/mailto/:%20hername@organization.org How do I make it act like a traditional HTML "mailto:" link? Would this be "htmlspecialcharacters()" or something else? Quote Link to comment Share on other sites More sharing options...
obsidian Posted July 23, 2007 Share Posted July 23, 2007 I have a "mailto:" link displaying through php: echo "<a href=\"mailto\: hername@organization.org\">"; echo $RESULTEQAB['EmailAddress']; echo "</a>"; .... but instead of it being a simple "Mailto:" link, it's linking to a fullblown URL: http://www.organization.org/folder/subfolder/mailto/:%20hername@organization.org How do I make it act like a traditional HTML "mailto:" link? Would this be "htmlspecialcharacters()" or something else? You don't need to escape the colon. That's what's causing your problem: <?php echo "<a href=\"mailto: hername@organization.org\">"; ?> Quote Link to comment Share on other sites More sharing options...
Moron Posted July 23, 2007 Author Share Posted July 23, 2007 You don't need to escape the colon. That's what's causing your problem: <?php echo "<a href=\"mailto: hername@organization.org\">"; ?> That did the trick. Thanks! Quote Link to comment Share on other sites More sharing options...
Moron Posted July 23, 2007 Author Share Posted July 23, 2007 Oops.... I forgot this part. I need to make echo $RESULTEQAB['EmailAddress']; .... a variable in the "mailto:" link. Quote Link to comment Share on other sites More sharing options...
obsidian Posted July 23, 2007 Share Posted July 23, 2007 Oops.... I forgot this part. I need to make echo $RESULTEQAB['EmailAddress']; .... a variable in the "mailto:" link. <?php echo "<a href=\"mailto: {$RESULTEQAB['EmailAddress']}\">"; ?> Quote Link to comment Share on other sites More sharing options...
Moron Posted July 23, 2007 Author Share Posted July 23, 2007 I figured it out. Thanks again. Quote Link to comment 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.