noobster
03-30-2007, 02:10 PM
Hi, hope the title was clear so that you arrived here...
i will first show my code then explain
<?php
#Valid news?
if ($news_bol > 0 && ($debut <= $today && $fin >= $today))
{
echo "<script type='text/javascript'>location.href='news.php';</script>";
}
# Valid video?
else if ($videos_bol > 0 && ($debut_v <= $today && $fin_v >= $today))
{
echo "<script type='text/javascript'>location.href='video.php';</script>";
}
else
{
echo "<script
type='text/javascript'>location.href='promo.php';</script>";
}
?>
here it is, so i check a value in php, if the value is right, i execute a javascript redirect, else i exec another, i first tried to pause my page with a php sleep() but that brings problems with my other pages executed at the same moment.so maybe there is a way in the javascript part of this?
can someone tell me how to pause the execution of the redirect for X seconds?
it would be so helpfull .
Thanks already.
i will first show my code then explain
<?php
#Valid news?
if ($news_bol > 0 && ($debut <= $today && $fin >= $today))
{
echo "<script type='text/javascript'>location.href='news.php';</script>";
}
# Valid video?
else if ($videos_bol > 0 && ($debut_v <= $today && $fin_v >= $today))
{
echo "<script type='text/javascript'>location.href='video.php';</script>";
}
else
{
echo "<script
type='text/javascript'>location.href='promo.php';</script>";
}
?>
here it is, so i check a value in php, if the value is right, i execute a javascript redirect, else i exec another, i first tried to pause my page with a php sleep() but that brings problems with my other pages executed at the same moment.so maybe there is a way in the javascript part of this?
can someone tell me how to pause the execution of the redirect for X seconds?
it would be so helpfull .
Thanks already.