Deleting a table without manually editing it?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Drachlen
Forum Contributor
Posts: 153
Joined: Fri Apr 25, 2003 1:16 am

Deleting a table without manually editing it?

Post 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.
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post 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.
Post Reply