I want to setup a redirect at the end of my script with php. Is there a way I can redirect without using headers? If I wanted to call another script and pass a variable to it, containing the URL to redirect to could I do that?

    The simplest way would be to echo out a small javascript call to load a location although this would require your clients to have javascript enabled:

    <script language='JavaScript'>
        document.location = 'Enter URL Here';
        return true;
    </script>

      I would also add a manual link, saying "You should be redirected automatically ... Click here to continue" or something to that effect.

      The problem with any form of redirect including a meta or javascript redirect is they don't always work.

      Some people do shut JS off when browsing, etc.

      If the javascript works the user will not see the text either way, so its a good idea to put it in.

        Its Probably easier to just have it go to another page and use a .htaccess file to redirect

          Write a Reply...