Why doesn't Refreshing the browser rerun PHP code?
Posted: Mon Jul 27, 2009 8:03 pm
The way I edit, run, and test PHP code is to edit it in Notepad, then pull up the web page (in PHP or HTML) in Internet Explorer to see if it's doing what I want. I have Notepad and IE running at the same time. So far I've been merely refreshing the IE browser screen whenever I want to rerun my PHP program, but tonight I ran into a scary experience that suggests I may be doing something very wrong. I was unable to get a program working all day, I tried running a different program finally, gave up on the second program, came to this forum to post my first (nonworking program), then suddenly when I came back to the first program, it was working! Whew, I wasted a whole day, for what?! Have I been doing something fundamentally wrong?
I noticed that it didn't help when I went to Internet options to erase history, cookies, passwords, everything--I got the same results after a browser refresh--but when I hit Return after the URL in the browser window I noticed that the program seemed to reset everything whereas if I just refreshed the program would seem to just be stuck on the same erroneous results from the previous run. So I guess I won't get stuck with that ineffectual refresh problem anymore, but it would be nice to know why refresh doesn't work. I'm using Windows XP with XAMPP.
The code I was running read a text file line by line, sent each line into a MySQL database, closed the text file and database, and the whole thing was initiated by a single Submit button. No textual inputs, almost no logic. Fairly simple. Could some submit flags or file flags have been set and not cleared somehow? It was the submit button and reentry into the same PHP program that was throwing me off, since none of my "isset" checks for flags seemed to work.
I noticed that it didn't help when I went to Internet options to erase history, cookies, passwords, everything--I got the same results after a browser refresh--but when I hit Return after the URL in the browser window I noticed that the program seemed to reset everything whereas if I just refreshed the program would seem to just be stuck on the same erroneous results from the previous run. So I guess I won't get stuck with that ineffectual refresh problem anymore, but it would be nice to know why refresh doesn't work. I'm using Windows XP with XAMPP.
The code I was running read a text file line by line, sent each line into a MySQL database, closed the text file and database, and the whole thing was initiated by a single Submit button. No textual inputs, almost no logic. Fairly simple. Could some submit flags or file flags have been set and not cleared somehow? It was the submit button and reentry into the same PHP program that was throwing me off, since none of my "isset" checks for flags seemed to work.