hey ppl. I have many submit buttons in a form. Each of them does its thing in different php pages. But when, for example, 'add' button goes to 'add.php' it does its work but stays there) how to redirect page back? thanks
Where 2 is the number of seconds to wait before sending a refresh command to the browser and the url obviously being the page you want to redirect to.
The main problem I have with the second is that the page has to load before it even begins the countdown and witin that amount of time, if the user presses ESC or clicks the stop button, the countdown stops and the page does not redirect. The header sent by php is, as far as I've ever been able to manipulate, impossible to stop from redirecting as it's one of the very first things the browser receives.
However, the header refresh can be tricky to use. As it's a header, you cannot echo or display ANY kind of text or anything. If you decide to use it but cannot get it to work, just post it and we'll see what we can do.