这是我页面顶部的 php 代码:
if(!$_SESSION['username']){
header("Location: ../error.php?id=1");
}
$teamgamertag = $_POST["gamertag"];
$teamgame = $_POST["game"];
$teamtype = $_POST["type"];
$teamname = $_POST["name"];
$teamconsole = $_POST["console"];
if(isset($_POST["submit"])){
$sql2 = mysql_query("INSERT INTO teams (name, game, players, creator, console, leaders, type, score) VALUES ('$teamname', '$teamgame', '$teamgamertag', '$teamgamertag', '$teamconsole', '$teamgamertag', '$teamtype', '0'") or die(mysql_error());
if($sql2){
header("../results.php?id=1");
}else{
exit();
}
}
?>
我不知道问题是什么以及在哪里解决它。提前谢谢你的帮助。