# Php \<? H E L P ?\>

**URL:** <https://forum.kirupa.com/t/php-h-e-l-p/18950>\
**Category:** Uncategorized\
**Created:** [April 22, 2003, 9:29pm UTC](https://forum.kirupa.com/t/php-h-e-l-p/18950 "2003-04-22T21:29:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![djozusa](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@djozusa](https://forum.kirupa.com/u/djozusa)\
**Post date:** [April 22, 2003, 9:29pm UTC](https://forum.kirupa.com/t/php-h-e-l-p/18950/1 "2003-04-22T21:29:13Z")

</div>

I have a Flash menu embeded in a php page and want to have the selected page display the proper content without changing pages and have Flash to detect the page and display the proper submenu.

That said, this is what I have tried so far with no luck.

Flash button Script:

```auto

on (press) {
    var page = "home"
    getURL ("index.php", "_self", "POST");
}

```

* * *

PHP Script:

```php

<?php 
   $page_id=$_POST['page']; 
?>

```

If the variable was passed I would add it the embeded flash script like so:

```php

value="flash/header.swf?page_id=< ?php print "page_id"; ?>"

src="flash/header.swf?page_id=< ?php print "page_id";?>"

```

Any help is greatly appreciated, and if there is a better way to do what I’m aiming for please let me know.

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 11:41pm UTC](https://forum.kirupa.com/t/php-h-e-l-p/18950/2 "2003-04-22T23:41:15Z")

</div>

so what exactly are you trying to do? load the variables into Flash? I’m still a little unclear what you are attempting…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 11:44pm UTC](https://forum.kirupa.com/t/php-h-e-l-p/18950/3 "2003-04-22T23:44:39Z")

</div>

I dont think swf files can LOAD variables through this method (“GET”). I haven’t came accross anything like this before. 🙂

You can load the php script using the LoadVars object though. That’ll do it

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 23, 2003, 2:11am UTC](https://forum.kirupa.com/t/php-h-e-l-p/18950/4 "2003-04-23T02:11:05Z")

</div>

Jubba -

I’m attempting to pass variables from flash to php when a button is hit.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 23, 2003, 2:40am UTC](https://forum.kirupa.com/t/php-h-e-l-p/18950/5 "2003-04-23T02:40:29Z")

</div>

oh ok, try

```php

<? echo $page_id ?>

```

instead of what you have. Becuase what you are printing is the string “page\_id” you aren’t telling php to print a variable value, you are only telling it to print that string.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 23, 2003, 2:50am UTC](https://forum.kirupa.com/t/php-h-e-l-p/18950/6 "2003-04-23T02:50:48Z")

</div>

Jubba-  
can you feed an swf the variables through this method:q:

```auto
../flash/header.swf?page_id=< ?php print "page_id";?>"

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 23, 2003, 1:55pm UTC](https://forum.kirupa.com/t/php-h-e-l-p/18950/7 "2003-04-23T13:55:30Z")

</div>

no. I’ve never tried, but I’m pretty sure you can’t. That would be using the “get” method, but going about it the wrong way…

But thats not what they are trying to do, they say they are trying to send variables from Flash, to PHP and its just not printing out the right way…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 23, 2003, 3:15pm UTC](https://forum.kirupa.com/t/php-h-e-l-p/18950/8 "2003-04-23T15:15:12Z")

</div>

oh… i thought so too… but i kinda misunderstood what they’re trying to do 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 23, 2003, 3:24pm UTC](https://forum.kirupa.com/t/php-h-e-l-p/18950/9 "2003-04-23T15:24:41Z")

</div>

yeah me too… 🙂 I still don’t fully understand but I corrected the php anyway…
