Jump to content


Timed Redirect


2 replies to this topic

#1 Hyprkookeez

    Young Padawan

  • Members
  • Pip
  • 49 posts
  • Location:Edmonton AB CA
  • Interests:Photoshop, HTML

Posted 23 May 2005 - 06:28 PM

I've seen scripts where they instantly redirect pages, but I need a script where it would transfer them in like 5 seconds. Out of like the 14 scripts for redirecting pages, none of them have timed redirect! Can anyone help me out? I'm trying to build an admin panel.

#2 Erich

    Young Padawan

  • Members
  • Pip
  • 43 posts

Posted 23 May 2005 - 08:38 PM

Is this what your looking for?

<?php

header("Refresh: 3; URL=/index.phpnn");

echo " "; //Add what you want displayed here

exit();

?>


#3 Hyprkookeez

    Young Padawan

  • Members
  • Pip
  • 49 posts
  • Location:Edmonton AB CA
  • Interests:Photoshop, HTML

Posted 23 May 2005 - 09:13 PM

Aha! I figured it out!
<?
if($cmd=="delete")
{
    $sql = "DELETE FROM link WHERE id=$id";
    $result = mysql_query($sql);
    echo "Row deleted!";
    echo "echo ("<META HTTP-EQUIV=refresh content=1;URL=http://www.redirecturl>");
}
?>

The 1 is how many seconds. and the http://www.redirecturl is self explanitory.

I have another question now.

I use a <?php include thing and when i put
<? echo($_SERVER['PHP_SELF']) ?>
Inside the include, and display it on another page it show up as the url that was included. Any way i could get it to show up on the page that it's being viewed on?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users