[Gllug] anyone into PHP?

Darran D. Rimron-Molloy darran at rimron.co.uk
Tue Nov 6 15:06:32 UTC 2001


> On Tue, 2001-11-06 at 13:13, Allen Wayne wrote:
>
> silly PHP question..... how do I force a jump to another page in PHP?

I spent a while on this topic, this is how I would do it...

        function do_redirect ( $url )
        {
                Header ( "Location: $url" );
                DocHeader("Redirect"); ?>
<TABLE WIDTH="80%" BORDER="0" ALIGN="CENTER" BGCOLOR="#FFFFCC">
  <TR>
    <TD>
      <p align="center">Your browser does not support redirection links -
but
        do not worry, that is not a problem. You would have been
automatically
        redirected to a new page (<A HREF="<?php echo $url;?>">
        <?php echo $url;?>
        </A>) if it had, please proceed to this distination manually by
clicking
        the link!</p>
    </TD>
  </TR>
</TABLE>

<?php
        DocFooter();
        }

DocHeader and DocFooter are functions that layout the page so the style
matches the rest of your site. This procedure has the advantage of working
on old browsers first....

	-Darran


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list