I am trying to redirect to a new page once a script is done throwing csv data into a db...it roughly takes about 15 seconds to do so. Once that import is complete. I want it to redirect to a completion page... any ideas on how to do this? Thank you!!
But his there a way to have it redirect after the script finishes its job?.. dynamically? script start parsing parsing parsing parsing script complete redirect
You can use javascript. Put this at the bottom of the script: echo "<script language=javascript> setTimeout(\"location.href='index.php'\", 0) </script>"; PHP:
Slightly different to premiumscripts, if you want to direct to a page on your website: header("Location: index.php"); die();
I'm not sure it's a good idea, see the PHP manual pages: Note: HTTP/1.1 requires an absolute URI as argument to » Location: including the scheme, hostname and absolute path, but some clients accept relative URIs.