Sualdam
06-14-2003, 08:24 PM
I've been working on this small project - an online 'to do list' application - all day and I've been pulling my hair out.
It's dead simple - it uses PHP to write new 'to do' items to a text file. Then, it reads the text file in, splits it into a multi-dimensional array for display purposes.
The problem I've had is that no matter how I try, when you add a new record it duplicates the entire text file contents in the display window. SO you get two of everything.
After just about every possible attempt to debug, I've just found the problem. I have a string called 'mainStr' which is the new record data. I clear this string out when the 'submit' button is pressed.
Trouble is, I'd called it 'minStr' (damned typo).
Aaargh. The whole day it's taken me to find that.
It's dead simple - it uses PHP to write new 'to do' items to a text file. Then, it reads the text file in, splits it into a multi-dimensional array for display purposes.
The problem I've had is that no matter how I try, when you add a new record it duplicates the entire text file contents in the display window. SO you get two of everything.
After just about every possible attempt to debug, I've just found the problem. I have a string called 'mainStr' which is the new record data. I clear this string out when the 'submit' button is pressed.
Trouble is, I'd called it 'minStr' (damned typo).
Aaargh. The whole day it's taken me to find that.