Php add to text file

ok i am sorta new to php but i am trying to make php append text to a text file… ive made a flash form with 2 input text boxes with the variables “name” and “message” and in the button i have the code


loadVariablesNum("board.php", 0, "POST");

now in my board.php file i have


<?php

$file = 'board.txt';

chmod ($file, 0777);

$msg = "Name:      $name

";

$msg.= "Message:   $message

";

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

fwrite($fp, $msg);

fclose($fp);

?>

and also with the swf and the php i uploaded a file called “board.txt” with the text in it saying “messageBoard=” so when i append text i can read it back into flash to load it into a text box… but for some reason my text file never gets edited at all… i have looked at a hit counter post by jubba to get the file read/write stuff and to learn about the chmod stuff (with a little online searching) and this is what i came up with… yes, the server i upload to supports php because i have a php/flash mail form i tested on there (thanks to you smart people here at kirupa) so i was hoping you could tell me what im doing wrong on this very very basic version of a message board… thanks in advance to anybody that can help

see jubba’s thread on storing data in textfiles, that should get you on the right track

k thanks

umm ahmed after some searching i seem to not be able to find that thread… can you help me out plz

http://www.kirupaforum.com/forums/showthread.php?threadid=17604&highlight=ahmed

thanks