i have a scenario where user when click on a link, he is directed to a page in which i want to add a code to fetch a variable and redirect to another page.

.i.e. user click on `<a href="sample.tpl">click here</a>` 

on sample.tpl i want to write a code to redirect him to another page

```
<script>
window.location="http://mydomain.com/?page_id=10"

```

**but i want to send a variable too on this new link without appending it to url for security reasons** 

how can i do it with some safe procedure.

Do ask me questions plz if it is not clear.