I am a newbie in php and I just entered the file writing. I have created a file and write to it from the browser with input text box. But when ever I write the older contents are rewritten. Can I make it static ??? Help !!!
When you say: "But when ever I write the older contents are rewritten." do you mean: "But when ever I write the older contents are OVERwritten"? If so, you need to open the file in APPEND mode. Instead of opening it with the 'w' or 'w+' flag, try using 'a' or 'a+'.
http://us2.php.net/fopen http://us2.php.net/fwrite As mentioned above, use "append" or "a+" Example: <?php $fp = fopen("file.txt", "a+"); fwrite($fp, "Hello! "); fwrite($fp, "World!"); ?> PHP: