怎么样实现提示删除成功后过5秒钟转向其他网页?
<?php
$id=$_GET["id"];
$db=mysql_connect("localhost","root","");
mysql_select_db("huiyuan",$db);
mysql_query("set names 'gbk'");
mysql_query("delete from huiyuanka where id=$id",$db);
echo "删除成功!";//后面写转向的代码......?>

解决方案 »

  1.   

    echo '<meta http-equiv="refresh" content="5; url=indes.php">';
      

  2.   

    js,晚上搜索哈就可以,echo出那个js就行了
      

  3.   

    js吧。<script language="javascript">  
     var maxtime = 60*60 //一个小时
     function showtime(){  
      if(maxtime>=0){  
       minutes = Math.floor(maxtime/60);  
       seconds = Math.floor(maxtime%60);  
       msg = "距离结束还有"+minutes+"分"+seconds+"秒";  
       document.all["show"].innerHTML=msg;   
       --maxtime;  
      }  
      else{  
       clearInterval(timer);  
       alert("时间到!");  
      }  
    }  
    timer = setInterval("showtime()",1000);   
    </script>  
    <div id="show"></div>