# Php to text

**URL:** https://forum.kirupa.com/t/php-to-text/232360
**Category:** Uncategorized
**Created:** [July 13, 2007, 3:03am UTC](https://forum.kirupa.com/t/php-to-text/232360 "2007-07-13T03:03:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![npgames](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/npgames/32/2914_2.png) [@npgames](https://forum.kirupa.com/u/npgames)
#### Post date: [July 13, 2007, 3:03am UTC](https://forum.kirupa.com/t/php-to-text/232360/1 "2007-07-13T03:03:49Z")

</div>

I have been trying to take data from flash, give it to a txt file with php, and get that data back into flash, i knew how to get data into flash, im learning how to get it into flash, but saving it into a txt file is confuzing me.

i have this script thats from a couple different sources, and i can get the first 2 pieces to work, but the last part wont work

\<?  
// Receiving the variables.  
$nam = $\_POST[‘nam’];  
$xx = $\_POST[‘xx’];  
$yy = $\_POST[‘yy’];  
// print the names  
print "your name is ". $nam . “.”;  
print “You are “. $xx .” pixils from the left.”;  
print “You are “. $yy .” pixils from the top.”;  
// write to txt file  
[COLOR=red]$file = fopen(“php\_test.txt”, “w+”);[/COLOR]  
[COLOR=red]fwrite($file, “count=”.$xx); [/COLOR]  
[COLOR=red]fclose($file);[/COLOR]  
?\>

the red part wont work, its supposed to set the file php\_text.txt to count = $xx
