# PHP to Flash vars

**URL:** <https://forum.kirupa.com/t/php-to-flash-vars/127880>\
**Category:** Uncategorized\
**Created:** [November 7, 2004, 5:02pm UTC](https://forum.kirupa.com/t/php-to-flash-vars/127880 "2004-11-07T17:02:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![StarXploser](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/starxploser/32/875_2.png) [@StarXploser](https://forum.kirupa.com/u/StarXploser)\
**Post date:** [November 7, 2004, 5:02pm UTC](https://forum.kirupa.com/t/php-to-flash-vars/127880/1 "2004-11-07T17:02:07Z")

</div>

I’ve been trying to figure this out for hours, many hours…

```php

$table=forum;
if($_GET['action'] == displayNews) { $table=news;};
$query="SELECT * FROM $table";
$result=mysql_query($query);
$row = mysql_fetch_assoc($result);
echo "&name=$row[title]&";

```

it doesnt matter what’s in the PHP file really… but my point is: flash doesn’t go through the IF Statements in the PHP so if i change the variable in the PHP file dynamically, flash returns UNDEFINED.

im gonna explain it again to be clearer.  
in php i can initialize a Variable.  
for example  
$section=“news”;  
then i can change it.

```php

if ($_GET['action']=="contact")
{ $section="contact" ;}

```

but flash won’t look at that… it will just load whatever value was there initially.(“news”)

please Help. thank you
