PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
davidprogramer
Forum Commoner
Posts: 64 Joined: Mon Nov 28, 2005 6:11 pm
Post
by davidprogramer » Mon Dec 05, 2005 3:05 pm
Subject says it all. I am trying to a put a delay so they can see the error message before the page refreshes.
Code: Select all
if ($removed_player == $your_playerid){
echo "You can't remove yourself without first promoting someone else to clan owner.";
echo "<meta http-equiv=\"refresh\" content=\"N; URL=modules.php?name=League&file=clan_info&lid=$current_ladder&cid=$clan_id\">";
die();
}
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Mon Dec 05, 2005 3:06 pm
LOL... Did you copy and paste this?
Code: Select all
echo "<meta http-equiv=\"refresh\" content=\"N; URL=modules.php?name=League&file=clan_info&lid=$current_ladder&cid=$clan_id\">"
The value of "N" is the number seconds before the refresh.. i.e.
Code: Select all
echo "<meta http-equiv=\"refresh\" content=\"10; URL=modules.php?name=League&file=clan_info&lid=$current_ladder&cid=$clan_id\">"
Last edited by
Chris Corbyn on Mon Dec 05, 2005 3:07 pm, edited 1 time in total.
foobar
Forum Regular
Posts: 613 Joined: Wed Sep 28, 2005 10:08 am
Post
by foobar » Mon Dec 05, 2005 3:06 pm
You almost have the answer right there in your post!
Code: Select all
if ($removed_player == $your_playerid){
echo "You can't remove yourself without first promoting someone else to clan owner.";
echo "<meta http-equiv=\"refresh\" content=\"5; URL=modules.php?name=League&file=clan_info&lid=$current_ladder&cid=$clan_id\">";
die();
}
Replaced the N in your meta refresh tag with 5 so it delays refreshing to 5 seconds.
[edit] Damn... this time it was me...