[Wolves] php mailto formatting query

David Goodwin david at codepoets.co.uk
Mon Sep 10 21:17:40 UTC 2012


On 10 Sep 2012, at 21:25, Wayne Morris wrote:

> can someone help me with this one:
> 
> first 2 lines work, can't get the formatting right for the last, i'm hopeless with slashes:
> 
> print("<TD nowrap style=\"border-bottom: 1 solid #800000\">".$status." </td>");
> print("<TD><a href=\"http://streetmap.co.uk/postcode/".$row["postcode"]."\" target=\"_blank\">Map</a>\n");
> 
> //print("<TD><a href=\"mailto:info at xxxx.com?subject=".$row["postcode"]."\" target=\"_blank\">Email Enquiry</a>\n";
> 


Try e.g. 

print("<TD><a href='mailto:info at xxxx.com?subject={$row["postcode"]}' target='_blank'>Email Enquiry</a>\n";

(Note use of { and } to surround PHP variables you are embedding within a double quoted (") string, and use of single quotes (') for the HTML attributes.)


David.





More information about the Wolves mailing list