PDA

View Full Version : Pls help I need it badly thanks...


Torner983
7th February 08, 10:23 AM
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
ID FIRSTNAME LASTNAME AGE
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..
REPLY ASAP

Sydius
10th February 08, 03:34 AM
I know this doesn't especially answer your question, but you might try learning MySQL along with PHP. They work together very nicely, and it might be easier to do things like that if you were to connect to a database instead of to a text file.

chrishirst
15th February 08, 07:55 AM
format it into XML nodes like

<clientlist>
<client>
<cid>1</cid>
<firstname>Ian</firstname>
<surname>Uy</surname>
<age>27</age>
</client>
<client>
<cid>2</cid>
<firstname>Jackson</firstname>
<surname>Lee</surname>
<age>32</age>
</client>
</clientlist>


And use a PHP XML Parser (http://uk3.php.net/xml)