$qry_str = "insert into ads values('','$ordid','$prdnm','$ordsku','$ordadd','$retadd')";
if($con->query($qry_str) === TRUE)
{
/*header("Location:your another page link here?msg=New%record%added%successfully");*/
echo "<script type='text/javascript'> alert('Inserted succcessfully'); </script>";
unset($_POST['insert']);
}
else
{
echo "Error:".$con->error;
}
mysqli_close($con);
答案 0 :(得分:0)
尝试修改
$qry_str = "insert into ads values('','$ordid','$prdnm','$ordsku','$ordadd','$retadd')";
if($con->query($qry_str) === TRUE) {
header("Location: http://your-site.com/a.php?msg=New%record%added%successfully");
echo "<script type='text/javascript'> alert('Inserted succcessfully'); </script>";
unset($_POST['insert']);
mysqli_close($con);
exit;
}
else {
echo "Error:".$con->error;
}
mysqli_close($con);