[CLUG] TECH/PHP question
Fixer
fixer at vigilante.net
Tue Oct 23 20:17:03 IST 2001
I have a file on the filesystem with the following format:
name.jpg}caption1
name2.jpg}caption2
...
nameN.jpg}captionN
if you can guess, it's for an image gallery. Appending new lines on a file
upload process is quite easy with fopen/fput. The trick comes in when I have
multiple, say 10, images listed and now want to delete one or change the
caption.
I am using php.
I can read the file into an array which leaves each line as an element in
the array,
and if I for loop thru it, I can use list to make $filename and $caption
variables.
Display of each in an html form is no problem. I currently have a copy of the
thumbnail image, a text field with the caption and a "delete" checkbox.
The issue is how do I capture the new data for all 10 caption fields and then
edit the config file from earlier? I haven't quite gotten my head wrapped
around
multidimensional arrays, or even if they are appropriate for this. I think
I have
over thought it, so I am turning to others for a bit of inspiration.
--
fix.er \'fik-s*r\ n : one that fixes : as : one that intervenes to
enable a person to circumvent the law or obtain a political
favor : one that adjusts matters or disputes by negotiation
More information about the Cork
mailing list