$sql="UPDATE `youtube` SET `yid`='$id',`ypage`='$page',`yframe`='$yvideo',`ytitle`='$title',`ydate`='$date' WHERE yid='$id'";
$result=sqlquery($sql);
if($result)
{
echo "<script>alert('your video has been uploaded');</script>";
header('location:videoupload.php');
exit;
}
答案 0 :(得分:1)
如果您使用header()
作为JS Alert的重定向,那是不可能的。因为标题已经发送,您将看不到警告框。相反,这将有效。
echo "<script>alert('your video has been uploaded');</script>";
//header('location:videoupload.php');
echo "<script>window.location.href='videoupload.php'</script>";
exit;
但是根本不建议使用Javascript重定向!