Hello again, I have been working on a website since I began PHP about a year ago, and now I'm looking to clean it up a little and one of the things I'd like to fix was one of the first things I did and it's such an embarassing detail that I still don't know how to fix. Long story short, several webpages on my site require heavy, time consuming activities, particularly the mosaic maker, which is entirely php based. Most of these pages will crash if I make them do everything at once and will return an internal server error. To fix this, I break down each task into steps, for example it will only do one column at a time when making a mosaic, then it will redirect to the same page with a get variable with the column number+1 to work on next. Like this, it continues reloading the page until the task is done. This works well on smaller projects, but confuses people when they see their page refreshing every few minutes and sometimes return an error that says the page has redirected in a way that will be infinite. I am sure there is a better way to do this and I am willing to rewrite the process to find something more usual and efficient, but I still have not learned how to do this or what to google to find this type of solution. Does anyone know a way to keep a php looping until it finishes everything on one page? It has been driving me crazy!
It sounds like this could be done better by integrating ajax, that way the page wouldn't have to refresh. There's plenty of php ajax tutorials out there to get you started. Cheers!
Funny, I was just reading an introduction to AJAX the other day. I think I could utilize it pretty well. Thanks Just because I've never used it before though, could someone give me a general idea of what to do? I'm not asking for the code or anything specific, I was just wodnering of doing something as simple as creating a request to use an external php script will actually do what I need in or I need to do something more complex to avoid the internal server error. Or would I just break it down into small files and have them execute consecutively.