Hello guys,

I want to learn php, writing all these data instead, to the textfile called employees.txt in the notepad of course. I heard its posible.

Supposing you have a data already in a textfile.txt that contain

MY CLIENTS DATA in employees.txt
1 IAN UY 27 delete edit
2 JACKSON LEE 32 delete edit
3 JEAN TY 38 delete edit
4 JAMES HAT 22 delete edit
5 ARMAN CO 20 delete edit

and all i want is to make a php file that would display them all to a table format in view.php for example and of course I can EDIT and DELETE each one of them for example i would like to delete the first line IAN. Thats what exactly i want.

any sample code and right codes pls give me...i am getting crazy about this php is very confusing..but I am not giving up...never...pls help...ty

Pls help that would be greatly appreciated. Thanks..

10 Years
Discussion Span
Last Post by godong

Hi there, it is basically a file access question, you can open the file using one of PHP file handling utilities. My favorite is using file(). This will read your data into an array, if you want to delete one of them, you can create a form and post the line that you want to delete and do a file() and then fopen it for write, write only the line you want to delete. For security measure (To avoid duplicate), you can create a lock for this read write procedure.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.