# Query string to HTML

**URL:** <https://forum.kirupa.com/t/query-string-to-html/297460>\
**Category:** web dev\
**Created:** [October 2, 2009, 12:02pm UTC](https://forum.kirupa.com/t/query-string-to-html/297460 "2009-10-02T12:02:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunGLASS](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sunGLASS](https://forum.kirupa.com/u/sunGLASS)\
**Post date:** [October 2, 2009, 12:02pm UTC](https://forum.kirupa.com/t/query-string-to-html/297460/1 "2009-10-02T12:02:06Z")

</div>

1. How to add an query string (ID) to a HTML page?

2. Also is it possible to pass an email address as the query string?

**3. Basically what I need is to pass an querrystring ID and [FONT=Calibri][FONT=Verdana]match it to an ID on a PHP server side script, then pass the email address into Flash.[/FONT] :top\_hat:[/FONT]**

I found this by googling. But when I add the following to the HTML (between the headers) in IE it says **Error on page**. 😕

```auto
<script type="text/javascript"> 
function relocate(select,attribName) 
{
var addQuery = select.options[select.selectedIndex].value; 
if(!addQuery) return; /* no selection */ 
var currQuery = location.search.substring(1); location.href += 'to]po5(currQuery?"&":"?") + attribName+"="+addQuery; } </script> 

```
