# Adding a php variable into a send mail \<a href\>

**URL:** <https://forum.kirupa.com/t/adding-a-php-variable-into-a-send-mail-a-href/301900>\
**Category:** Uncategorized\
**Created:** [December 17, 2009, 3:18pm UTC](https://forum.kirupa.com/t/adding-a-php-variable-into-a-send-mail-a-href/301900 "2009-12-17T15:18:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hey\_suburbia](https://avatars.discourse-cdn.com/v4/letter/h/977dab/32.png) [@hey\_suburbia](https://forum.kirupa.com/u/hey_suburbia)\
**Post date:** [December 17, 2009, 3:18pm UTC](https://forum.kirupa.com/t/adding-a-php-variable-into-a-send-mail-a-href/301900/1 "2009-12-17T15:18:49Z")

</div>

I have a Flash game that allows you to drag MC’s around and save their locations via URL query string. This works great except the string is 2 miles long…

The idea of the game is to “send to a friend” what you created. So I wrote up a simple PHP mailer. I can easily dump the giant URL into the mailer, but it’s UGLY…

SO…

I went to be able to put the URL query string into a link that hides it’s length.

I have had some experience with html in php mailers, but they were always seperate. ie

\<body\>

\<?php\>  
code  
?\>

html stufff

\<?php\>  
code  
?\>

\</body\>

What I’m trying to achieve is something to this effect:

```php

$message = $_POST["longUrl"];

echo("Check out this Holiday Card I made for you: " . <a href=". $message . ">mydomain.com</a> ". ");

```
