Jump to content

[SOLVED] Using a simple "mailto:" link inside php?


Moron

Recommended Posts

I have a "mailto:" link displaying through php:

 

echo "<a href=\"mailto\: [email protected]\">";
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/:%[email protected]

 

How do I make it act like a traditional HTML "mailto:" link? Would this be "htmlspecialcharacters()" or something else?

 

 

 

 

 

I have a "mailto:" link displaying through php:

 

echo "<a href=\"mailto\: [email protected]\">";
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/:%[email protected]

 

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: [email protected]\">";
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.