I'm very new to PHP so forgive me if this is an easy question. I have a form and a page. The form works as needed (HTML), but I can't seem to get the PHP part working. I've looking for a while now but haven't been able to find where my mistake is in my code. The code is as follows:
<?php
$conn = mysqli_connect("sql300.epizy.com", "epiz_25296769", "****", "epiz_25296769_matches");
if ($conn-> connect_error) {
die("Connection Failed".$conn-> connect_error);
}
$Date = $_POST['Date']
$Opponent = $_POST['Opponent'];
$Result = $_POST['Result'];
$XtC_Score = $_POST['XtC_Score'];
$Opponent_Score = $_POST['Opponent_Score'];
$Tag = $_POST['Tag'];
$Stage = $_POST['Stage'];
$Notes = $_POST['Notes'];
$sql = "INSERT INTO list (Date, Opponent, Result, XtC_Score, Opponent_Score, Tag, Stage, Notes)
VALUES ('$Date','$Opponent','$Result','$XtC_Score','$Opponent_Score','$Tag','$Stage','$Notes')";
if ($conn->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
}
?>
I should mention the connection isn't the problem, as that seems to be working fine when I remove everything down from the connection code. Any help is greatly appreciated and sorry for the simple question.
EDIT: The form is as follows:
<form action="insert.php" method="post">
Date<input type="date" name="Date" /><br><br>
Opponent<input type="text" name="Opponent" /><br><br>
Result<input type="text" name="Result" /><br><br>
XtC Score<input type="text" name="XtC_Score" /><br><br>
Opponent Score<input type="text" name="Opponent_Score" /><br><br>
Tag<input type="text" name="Tag" /><br><br>
Stage<input type="text" name="Stage" /><br><br>
Notes<input type="text" name="Notes" /><br><br>
<input type="submit" /><br><br>
The error I get is HTTP Error 500, unable to handle request.