Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing variables to mailto:

Status
Not open for further replies.

presfox

Technical User
Joined
Jan 30, 2004
Messages
15
Location
NL
<?echo &quot;<a href=&quot;mailto:$em1&quot;> $id1 </a>&quot;;?>

any reason that that gives a parse error?
 
You need to use the escape clause to tell php that the &quot; in the href isn't the end of the string.
try:
Code:
<? echo &quot;<a href=\&quot;mailto:$em1\&quot;>  $id1 </a>&quot;; ?>
 
Westbury is right.
IMO the safest and clearest way is to use concatenation:
Code:
<?php echo '<href=&quot;mailto:'.$em1.'&quot;>'.$id1.'</a>';?>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top