Page 1 of 1
[SOLVED] - Insert URL in mailto:body
Posted: Sat Sep 04, 2004 3:32 am
by anjanesh
Code: Select all
echo '
<A HREF="mailto:user@domain.com?subject=link&body=index.php?'.$_SERVER['QUERY_STRING'].'" </A>
';
The url has many get parameters.
This obviously stops on getting a variable other than subject and body.
Having $_SERVER['QUERY_STRING'] in single quotes doesnt work either.
How do I insert the url in body ?
Posted: Sat Sep 04, 2004 6:59 am
by timvw
Code: Select all
HREF="mailto:user@domain.com?subject=link&body=index.php&'.$_SERVERї'QUERY_STRING'].
mind the & after index.php instead of the ?
Posted: Sat Sep 04, 2004 9:35 am
by feyd
url encode the entire url you want in the body.
Posted: Sat Sep 04, 2004 10:43 pm
by anjanesh
Yes Feyd. got the url in body to work - $url=htmlentities(urlencode($url));
Is there a method have this done (using onClick instead of A HREF). ?
<TD onClick="mailto:whatever">
Posted: Sun Sep 05, 2004 12:20 am
by feyd
sure..
Code: Select all
document.location.href = 'mailto:blahblahblah';
don't rely on javascript being on though
