|
Posted by william.clarke on 07/18/06 22:09
Geoff Berrow wrote:
> Message-ID: <1153193066.107423.267520@m79g2000cwm.googlegroups.com> from
> clashers5@gmail.com contained the following:
>
> > exit("<script>window.location.href='login.php?page=$page</script>");
>
> Fine but why rely on Javascript? Why not just do:
>
> header("Location:login.php?page=$page");
> exit();
Exactly what I was about to post, but Geoff beat me to it :)
header("Location:login.php?page=$page");
will work no matter what Javascript settings the user has, while:
exit("<script>window.location.href='login.php?page=$page</script>");
relies on the visitor's browser understanding javascript (not such a
big problem these days) and on them allowing JavaScript redirects
(which can still be a problem)
Navigation:
[Reply to this message]
|