# Uploading information from PHP

**URL:** <https://forum.kirupa.com/t/uploading-information-from-php/29002>\
**Category:** Uncategorized\
**Created:** [August 20, 2003, 11:26pm UTC](https://forum.kirupa.com/t/uploading-information-from-php/29002 "2003-08-20T23:26:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fydus](https://avatars.discourse-cdn.com/v4/letter/f/8c91f0/32.png) [@Fydus](https://forum.kirupa.com/u/Fydus)\
**Post date:** [August 20, 2003, 11:26pm UTC](https://forum.kirupa.com/t/uploading-information-from-php/29002/1 "2003-08-20T23:26:04Z")

</div>

How do you upload information from variables in PHP to flash?  
I want my dynamic text box to upload information from the variable $msg.

I also have some questions about this code. I didn’t know how to do everything I had here, so I borrowed some code from [This Post](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=24666&perpage=15&highlight=php%20flash&pagenumber=2) .

Could someone explain what -  
$data = fread($fp, “Goes here”);  
and -  
$fp = fopen($file, “Goes Here”);  
I also would like to know if I can do what I did with this peice of code, adding html in the middle of it.  
$new .= “\<b\>Name:\</b\> $name /n”;

\<?  
$file = “test3.txt”;  
$fp = fopen($file, “a+”);  
$data = fread($fp, 80000);  
ftruncate($fp, 0);  
$new = “$data”  
$new .= “\<b\>Name:\</b\> $name /n”;  
$new .= “\<b\>Message:\</b\> $message /n /n”;  
$msg = “content=\<p align=“left”\>$new\</p\>”  
fwrite($fp, $msg);  
fclose($fp);  
?\>

Help??

---

<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:** [August 21, 2003, 2:20am UTC](https://forum.kirupa.com/t/uploading-information-from-php/29002/2 "2003-08-21T02:20:43Z")

</div>

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17604](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17604)

that whole thread is pretty much what you want.
