Forums

PHP

This topic is locked

Dynamic Email Link

Posted 08 May 2007 01:42:22
1
has voted
08 May 2007 01:42:22 Christie Applegate posted:
I have a page which pulls down all of our employees. I get how to link to the details page but I would like the email addresses to be able to link to email and populate their email address. How would I do this?
Christie

Replies

Replied 09 May 2007 04:31:49
09 May 2007 04:31:49 Alan C replied:
One way . . .

a normal mailto link would look something like

<pre id=code><font face=courier size=2 id=code>&lt;a href="mailto: "&gt;send me an email&lt;/a&gt; </font id=code></pre id=code>

so you could use something like

<pre id=code><font face=courier size=2 id=code>&lt;a href="mailto:&lt;?php echo $row_rsYourRecordset['email_field_name']; ?&gt; "&gt;send me an email&lt;/a&gt;</font id=code></pre id=code>

and if you wanted the link text to show the email address as well

<pre id=code><font face=courier size=2 id=code>&lt;a href="mailto:&lt;?php echo $row_rsYourRecordset['email_field_name']; ?&gt; "&gt;&lt;?php echo $row_rsYourRecordset['email_field_name']; ?&gt;&lt;/a&gt;</font id=code></pre id=code>

I'm not sure how you would get DW to do that for you, I think you would be able to do it by using the insert dynamic field, in a lot of cases I find it's quicker to build the page framework in DW letting it do all the hard work of setting up the database access then modify the code - sometimes I get in a mess because DW can't then handle what I've done, but when I keep all your php in small bits like shown it has a much better chance <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Reply to this topic