Steve , You are using a flat ascii file. Now you have 2 options: [1] For Huge Files: Overwrite the first character of the line to be deleted with a special character like '#' or '$' e.t.c. Although this approach will make deletion faster, the size of the file will be large as the deleted data are still there. To handle that situation, every night (when your machine is free), you can run a script that will read only non-deleted data from your file in a data structure or a temporary file and then overwrite your original file. [2] For Small Files: Read the file contents after that data to be deleted in a data structure, set your file pointer to the start of the data to be deleted and write those contents.
Cheers !! Dharmender Rai --- Steveo <[EMAIL PROTECTED]> wrote: > Thanks to the people on this list I've been able to > create a form > submission page that writes team data for a fps > league to a data file. I > can also call up that data and present it 'nicely' > on a web browser. The > next step for me is to be able to submit the name of > a clan I want to drop > from the data file and have a script delete it. My > data file is a simple > ascii text file that looks like this: > > clan1,leader1,webpage1 > clan2,leader2,webpage2 > clan3,leader3,webpage3 > etc... > > So what I would like to do is input 'clan2', submit > it and have a script > identify that line of data and drop it from the data > file. I'm not sure > how to go about this operation. Can someone give me > some advice on how to > approach this problem? > > Steveo (aka Haiku) > [EMAIL PROTECTED] > www.linuxhaiku.com > > > -- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]