# Trouble passing variables

**URL:** <https://forum.kirupa.com/t/trouble-passing-variables/150509>\
**Category:** Uncategorized\
**Created:** [June 8, 2005, 1:57am UTC](https://forum.kirupa.com/t/trouble-passing-variables/150509 "2005-06-08T01:57:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrobnett](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rrobnett](https://forum.kirupa.com/u/rrobnett)\
**Post date:** [June 8, 2005, 1:57am UTC](https://forum.kirupa.com/t/trouble-passing-variables/150509/1 "2005-06-08T01:57:01Z")

</div>

What Am I doing wrong??? Here is a section of code I’ve used to pass a variable to a php file

```auto
 
genreType = "Classic Rock";
this.bands_xml.URL = "genre.php?category="+genreType;
this.bands_xml.trigger();

```

and here is the section of code in the recieving the variable

```php
 
$key = $HTTP_GET_VARS[category]; 
//this line selects all fields from the table band_directory
$resultActive = mysql_query("SELECT * FROM band_directory WHERE (primaryID = ".$key." OR secondaryID = ".$key.") AND status = 'Active'");

```

when I did not pass the variable and set primaryID and secondaryID to Classic Rock The flash file worked. now it doesn’t. Any imput would be appreciated. I would be happy to explain further what I am doing if neccesary
