# Getting variables from a form into a flash file?

**URL:** <https://forum.kirupa.com/t/getting-variables-from-a-form-into-a-flash-file/250262>\
**Category:** Uncategorized\
**Created:** [January 27, 2008, 8:29pm UTC](https://forum.kirupa.com/t/getting-variables-from-a-form-into-a-flash-file/250262 "2008-01-27T20:29:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![a2xa](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@a2xa](https://forum.kirupa.com/u/a2xa)\
**Post date:** [January 27, 2008, 8:29pm UTC](https://forum.kirupa.com/t/getting-variables-from-a-form-into-a-flash-file/250262/1 "2008-01-27T20:29:20Z")

</div>

Let’s see if I can explain this…

My chat runs off of php,flash and a txt file to log it.

I’m giving the users to create their own “hub” or chat window. They enter their hub name into a field and it creates a txt file which is just a new log file (in essence)

(Everything has gone good up until now)

After they have created their text file they go to a seperate page to enter their “hub’s” name (the textfile they created). This is the part that I’m struggling with.

My form for them to enter their hubs is this:

```auto
<form action="./hubchat/shout.php" method="post">
Enter The Hub ID <input type="text" name="txtfile" />
<input type="submit" />
</form>

```

the shout.php is the main file that the flash file runs off of.

The main thing I’m trying to do is what the users hub name is posted as a variable into the shout.php file. Normally it isn’t a variable. it is just shout.txt this wouldn’t be a problem, but I don’t know how to carry the variables over from the php file to the flash file.

The .fla file is located here: [http://wiicharged.com/hubchat/shout.fla](http://wiicharged.com/hubchat/shout.fla)

the shout.php file can be located here: [http://wiicharged.com/hubchat/shout.txt](http://wiicharged.com/hubchat/shoutfile.txt)

If anyone could help me figure out how to do this I would be grateful. I’ll even put a helped by [kirupa.com](http://kirupa.com) in the [hubs](http://wiicharged.com/index.php?action=hubs) :snug:

Edit: whenever I try putting a $POST and running a flash file I get this whenever it tries to write to the file:  
 ![](http://wiicharged.com/Untitledjpg)  
 ![](http://wiicharged.com/Untitled.jpg)  
 ![](http://wiicharged.com/untitled.jpg) ![](http://wiicharged.com/untitled.jpg)
