Jump to content


Photo

page redirection


  • Please log in to reply
1 reply to this topic

#1 Bee

Bee
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts

Posted 06 March 2006 - 03:50 PM

Hi,

Does any body know a script to redirect a link to another web page?

Thank you

Bee

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 06 March 2006 - 04:43 PM

To redirect a user use the header function
<?php

header("Location: http://www.google.com");

?>
Or a refresh the page a fter say five secounds and it'll redirect to where ever:
<?php

header("Redirect: 5; URL=http://www.google.com");

echo "You will be redirected in 5 secounds to Google.com!";

?>
NOTE: Make sure you dont output anything before the user of header otherwise you script will not work!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users