# Flash and php....please help

**URL:** https://forum.kirupa.com/t/flash-and-php-please-help/597
**Category:** Uncategorized
**Created:** [July 23, 2002, 6:03pm UTC](https://forum.kirupa.com/t/flash-and-php-please-help/597 "2002-07-23T18:03:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![kent](https://avatars.discourse-cdn.com/v4/letter/k/b782af/32.png) [@kent](https://forum.kirupa.com/u/kent)
#### Post date: [July 23, 2002, 6:03pm UTC](https://forum.kirupa.com/t/flash-and-php-please-help/597/1 "2002-07-23T18:03:10Z")

</div>

I am trying to create a login section on my flash site that sends the variables username and password to a php login page. If that login is successful I would like the php section to open in a new window. If it fails I would like flash to be directed to an error message.

Can anyone help me. I have been working on this for days and have not gotten anywhere.

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: [July 23, 2002, 7:19pm UTC](https://forum.kirupa.com/t/flash-and-php-please-help/597/2 "2002-07-23T19:19:25Z")

</div>

I can probably help, but I have to wait until I arrive at home tonight (that’s where I use php). I’m not a pro at PHP, but I believe I can help you.

---

<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: [July 23, 2002, 7:39pm UTC](https://forum.kirupa.com/t/flash-and-php-please-help/597/3 "2002-07-23T19:39:29Z")

</div>

thank you…anything would be great

---

<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: [July 25, 2002, 4:00pm UTC](https://forum.kirupa.com/t/flash-and-php-please-help/597/4 "2002-07-25T16:00:38Z")

</div>

To call a php page use:

loadVariablesNum (“myPhpPage.php”, 0);

To use php to update a variable called dynamicText (in this example your IP Address) in your swf you use the syntax:

\<?php  
$ip = $REMOTE\_ADDR;  
echo (“text=”);  
echo ($ip);  
?\>

You can combine both echo statements or use print() if you prefer and you can update multiple variables.

You should also consider some kind of fail safe to detect if the browser/server hangs. The simplest way to do this is to declare a variable and then have the php page update it. You can then assign a timer that checks if the variable has been updated after a pre-determined interval.

---

<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: [July 26, 2002, 7:01pm UTC](https://forum.kirupa.com/t/flash-and-php-please-help/597/5 "2002-07-26T19:01:48Z")

</div>

> 

\*\*

To use php to update a variable called dynamicText (in this example your IP Address) in your swf you use the syntax:  
\*\*

Oops …

The variable should be \*\* text \*\*
