View Full Version : PHP/Write to TXT file help??

05-27-2003, 05:03 AM
Ok.... I am just trying to get the BARE minimums working here....until I fully undestand..(then Im sure I would add more advanced things like HTML , error checking..etc..etc..)

But what I have is an input text field. with the variable name of "input".

A blank text file called "posts.txt"

and I have a button that calls my PHP script

$fp = fopen("posts.txt", "a");
fputs($fp, $textboxname);

//(*I actually have $input in the PHP script..I have that to show my "logic" behind it)

I can NOT get anything to be written to the text file.
They are in the same directory. I have CHMOD'd the text file so it can be written too (666).

What am I mising here? Does the text file need something in it? Is there more that I need to have in the PHP script?