Re: Redirecting - header location - sometimes not work
| From: | Kevin Stone | Date: | Tue, 17 Sep 2002 19:44:23 +0000 |
| Subject: | Re: Redirecting - header location - sometimes not work | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-116661@lists.php.net to get a copy of this message | ||
It's curious that it should be working some times and not others. This may
be overkill but you might try a double redundent redirect where if the
Header() function does not do the job then the script falls down into a
Javascript which attempts the same thing.
<?
.. rest of script..
header("Location:$SERVER_NAME$path");
?>
<s cript>
top.location.href = "<?echo "https://$SERVER_NAME$path"?>";
</s cript>
-Kevin
----- Original Message -----
From: "jana konickova" <konicko@fsv.cvut.cz>
To: <php-general@lists.php.net>
Sent: Tuesday, September 17, 2002 10:03 AM
Subject: [PHP] Redirecting - header location - sometimes not work
> I have the php script with the command
> Header("Location: https://$SERVER_NAME$path");
> which redirect from the script "file1.php" to the script "file2.php".
> If I fill the form in the www page "file1.php" and click the Submit
button,
> the script "file1.php" save the information to database and then redirect
to
> the page "file2.php".
> This redirecting is functional, but not always. In some www browser the
> first redirecting not work, and if I return to the www page "file1.php"
and
> if I click the Submit button again, the redirecting working.
>
> Do you have some help, please?
>
> (Using Linux, Apache/1.3.23 & PHP 4.1.2)
>
> Much thanks!
>
> Jana Konickova
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>