doudengjin8251 2017-01-14 13:09
浏览 121

收到错误“在此服务器上找不到请求的URL”[重复]

This question already has an answer here:

The following php script is used by me to transfer the data in one database table to another database table and then delete the entry from the initial table!

<?php
    require("../../db/db.php"); //contains database connection

    if( isset($_GET['del']) )
    {
        $id = $_GET['del'];
        $sql1="INSERT INTO complete (`OrderNo.`,`NIC`,`DP`,`Address`,`DPTime`,`Telephone`,`Email`,`Image1`,`ImageName1`,`Image2`,`ImageName2`,`Image3`,`ImageName3`) 
        SELECT `OrderNo.`,`NIC`,`DP`,`Address`,`DPTime`,`Telephone`,`Email`,`Image1`,`ImageName1`,`Image2`,`ImageName2`,`Image3`,`ImageName3` FROM `order` WHERE `OrderNo.` = '$id'  ";

        $res1= mysqli_query($db,$sql1) or die("Failed".mysqli_error($db));
        $sql2= "DELETE FROM `order` WHERE `OrderNo.` = '$id' ";

        $res2= mysqli_query($db,$sql2) or die("Failed".mysqli_error($db));
        echo "window.location.href=vieworders.php";


    }
?>

Though sql queries are successfully(transfer and deletion) executed i get the error 'The requested URL was not found on this server" when loading the page vieworders.php! how can i correct this?

</div>
  • 写回答

1条回答 默认 最新

  • dtjpz48440 2017-01-14 13:14
    关注

    I'm guessing you have already put this inside a script tag otherwise you wouldn't be getting this error.

    Your redirect should show as:-

    echo 'window.location="vieworders.php"';
    

    or use:-

    header("Location: vieworders.php");
    
    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置