# Variables from php to flash

**URL:** https://forum.kirupa.com/t/variables-from-php-to-flash/294069
**Category:** flash
**Created:** [August 7, 2009, 8:38pm UTC](https://forum.kirupa.com/t/variables-from-php-to-flash/294069 "2009-08-07T20:38:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![m\_u\_r](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@m\_u\_r](https://forum.kirupa.com/u/m_u_r)
#### Post date: [August 7, 2009, 8:38pm UTC](https://forum.kirupa.com/t/variables-from-php-to-flash/294069/1 "2009-08-07T20:38:57Z")

</div>

So, I read the tutorial about passing variables by changing the url of the .swf with the following code:

```auto
if (movie==1 or movie=="") {
   trace("default");
}
if (movie==2) {
   getURL("http://www.yahoo.com");
}

```

My question is, is there anything special if I want it to respond to the url of a .php page? So, if I have a page that ends in “?page\_id=2” could I do the same thing or does it have to be an .swf?

```auto
if (page_id==1 or page_id=="") {
   trace("default");
}
if (page_id==2) {
   gotoAndPlay("pageTwo");
}

```
