Help writing to text file

i’ve just finished customizing a photo gallery in php to make it fully dynamic…and its all working with all the information in a text file and then i use that information to create the gallery…and now that its done, i want to make an easier way to write to the text file rather than opening up and changing it as needed. So i want to create some sort of form where i can input all the information and even upload a new image and it will write to the text file in the following form:

Awesome Gallery|photos/|142391447_l.jpg-thumbs/142391447_l.jpg-so flamboyant-Mr. moves142391784_l.jpg-thumbs/142391784_l.jpg-wild and crazy is he-Rockin’ danny142392907_l.jpg-thumbs/142392907_l.jpg-not anymore-Cut Shallow on tour142394266_l.jpg-thumbs/142394266_l.jpg-the only one wes is in and you can still barely see him-the whole gang51716042_l.jpg-thumbs/51716042_l.jpg-hawaiians are so hawaiian-hawaii51801565_l.jpg-thumbs/51801565_l.jpg-what the…-wide–eyed wescsmyspace.jpg-thumbs/csmyspace.jpg-don’t we just rock your face off?-Cut Shallow*cssicck500.jpg-thumbs/cssicck500.jpg-you heard me, shoot.-Epitome of awesome

i have each set of gallery information divided by “|” and then i have more information for the images where each set of image information is divided by “*” and going further, each peice of information is “-”. So i was wondering how i would create a form that could write all the information to the text file sorted in the proper way i need in order to read it.

can anyone help me? thanks in advance for any help i might get. =)