【发布时间】:2016-08-20 00:15:16
【问题描述】:
大家好,我有这样的网址页面
http://localhost/skripsi3/web/pesananwaiting.php?pilih=13
表格里面有个按钮,代码是这样的
echo "<a href='considered.php?idorder=" . $row['id_order']."'><button type='button' class='btn btn-primary btn-default btn-sm'>Considered</button></a>";
如果我单击该按钮,它将重定向到考虑的.php。做更新查询,这是我考虑的.php
<?php
session_start();
include "connectdb.php";
$idorder = $_GET["id"];
$cons = "Considered";
$query="UPDATE `preorder` SET `statuspesanan`='$cons' WHERE `id_order`='$_GET[idorder]'";
$result = mysql_query($query);
header("Location:pesananwaiting.php");
?>
我的问题是如何使用这样的参数将标头返回到 pesananwaiting.php
pesananwaiting.php?pilih=13
谢谢
【问题讨论】:
-
我只是想指出您所考虑的.php 脚本容易受到代码注入的影响。
标签: php mysql url-redirection