RE: in subject line php

genesisvh
genesisvh used Ask the Experts™
on
I have a page where it shows a providers email address but I want message box to show in the subject line the title of that page. This is the code that shows the provider's email:
echo "<td bgcolor='#FFFFFF' style='color: #000' align='center'> Provider's E-Mail: <a href= mailto:".$result['email'].">".$result['email']."</a><br /></td>";

Open in new window

This is the code that shows the title:
echo "<div id='title'><div align='center'>".$result['title']."<br/></div>";

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Try the following, more info can be found here:

http://www.ianr.unl.edu/internet/mailto.html
echo "<td bgcolor='#FFFFFF' style='color: #000' align='center'> Provider's E-Mail: <a href=' mailto:".$result['email']."?subject=".$result['title']."'>".$result['email']."</a><br /></td>";

Open in new window

Commented:

echo "<td bgcolor='#FFFFFF' style='color: #000' align='center'> Provider's E-Mail: <a href='mailto:".$result['email']."?subject=".$result['title']."'>".$result['email']."</a><br /></td>";

Open in new window

Author

Commented:
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial