I have a php script that needs to be run, at a users request. I want the user to click a button(image) and at that point, the php script will run. When finished, the page will reload. I tried doing a "loading .... " page, which I redirected to the php script... but the script takes too long to load, and so the browser timed out. Does anyone know how to do this? Thanks
have the php script spit out a meta refresh tag when it's done. the browser will take care of the rest.
Don't know f this is any help. If your after a really easy/lazy way to do it use the javascript: history function. I use it for an email form on my page, its not the prettiest way but it works without any problems as follows. In the middle of the php script add the end code tags and place javascript as below. mail( "someemail@mail.com", "Subject", "Name: $name\n \nMessage: $message\n \nFrom: $email", "From: $email" ); ?> <script language="Javascript"> javascript: history.go(-1) alert ("Your message has been sent. Thanks for the interest.") </script> <? Code (markup): Hope this helps