Hello. I am trying to build a war reporter(game reporter) and I am running into a problem. When I try to put in values I get 0’s in my database. I took out the database information for security reasons, but I know the connection is right because it is selecting the right table in the database, just giving all 0’s in the fields.
<?php include('functions.php') ?>
<html>
<body>
<?php
$Player1Kills=$_POST['myText'];
$Player1Deaths=$_POST['myText2'];
$Date=$_POST['Date'];
$VarPlayer1=$_POST['sub1'];
if($_POST['sub1']='Event')
{
$query = "INSERT INTO eventstats (Kills, Deaths,Date)
VALUES('$Player1Kills', '$Player1Deaths', '$Date')";
mysqli_query($database,$query);
}
if($_POST['sub1']='Archon')
{
$query = "INSERT INTO archonstats (Kills, Deaths,Date)
VALUES('$Player1Kills', '$Player1Deaths', '$Date')";
mysqli_query($database,$query);
}
?>
</body>
</html>