Edit: Got it sorted for the most part. I was way off, heh.
I've been working on this for a while, and I've gotten close, just not close enough. So far it'll delete one line but not multiple lines. Basically I have a listbox:
Code:
<select name='merchants[]' multiple="multiple">
<option value="8334">8334 - Playful Plush Toys</option>
<option value="4742">4742 - Nature Hills Nursery</option>
</select>
In a txt file I have:
8334,Playful Plush Toys
4742,Nature Hills Nursery
And I'm trying to open that file and delete any lines that match what's been selected in the listbox. Here's my, probably horribly, code.
PHP Code:
// horrible code removed
Again, it works with one line, but not multiple. Selecting multiple lines only removes the first line, and rewrites the file with an initial comma delimited blank line, followed by the second entry.
Bookmarks