Flash PHP/External text

okay, i want to set something up on my site using flash, php, and an external text document, so people can leave a brief message…
not like a guest book, but more like ‘tagging your name’ or something…

so this is my idea:

I have a button with this code:


on (release) {
loadVariablesNum(“write.php”, 0, “POST”);


and i have the write.php file like this:


// Let's declare the 2 variables: 

$name = $_POST['name']; 
$message= $_POST['message']; 

// Let's open the file we want to put the data in: 

$file = "textdata.txt"; 
$fp = fopen($file, "a+"); 

// Write to the file: 

fwrite($fp, $_POST['name'] . ":" . $_POST['message'] . "

That posts there name, and message to an external .txt file like this
name:message, every time some one subits it adds a new line…

i want to use flash to load external text into a dynamic text box, but how can i make it so it only loads the last line, or change the php to over write lines on the text instead of adding new lines???

any ideas?