Page 1 of 1

Deleting a table without manually editing it?

Posted: Sun Jun 01, 2003 1:34 am
by Drachlen
Hello, I have been working on my website, and I have a join feature which writes all the info they wrote to a php document that i can view, it is inserted as a table with all their data, and id like to be able to add a button to delete it from the document without manually editing it. Im not using mysql, just fopen and fwrite and fput... I wouldnt know how to go about doing this, if its even possible without using mysql.. I know im not suppost to post without code or ask directly for code, so if im breaking a rule on asking for it could i just be pointed to a tutorial? Thanks.

Posted: Sun Jun 01, 2003 5:01 pm
by McGruff
See manual for filesystem functions.

file() might be one way to do it: get rid of the key/value pairs corresponding to the lines in the file you wish to delete, implode back into a string, and overwrite the file with the string.