我试图在数据库中成功更新后立即将此 PHP 页面重定向到另一个页面.. 但是我收到 PHP 的警告并且没有任何反应.. 下面是代码.. 我哪里出错了?
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="css/madscore.css">
</head>
<body>
<?php
require('../database/connect.php');
?>
<?php
$id = $_POST["id"];
$value = $_POST["score"];
database_connect();
$query = "update people set Score= Score +".$value." WHERE ID ='".$id."'";
$result = $connection->query($query);
if($result)
{
?>
<?php
@header("Location: http://www.europe-zone.com/");
exit();
}
?>
</body>
</html>