我的 php 没有插入数据库:我真的不知道为什么:请我需要帮助,我无法找出问题所在:
<form action="insertfixture.php" method="post">
<tr><td>Date</td><td><input type = "text" name = "match_date" ></td></tr>
<tr><td><input type = "submit" name = "submit" value="update"></td></tr>
</form>
<?php
include_once("connect.php");?>
$match_date=(isset($_POST['match_date']))? trim($_POST['match_date']): '';
$sql="INSERT INTO fixture(match_date)
VALUES ('$match_date')";
$result = mysql_query($sql);
#if something goes wrong then tell the user
if($result){
echo "New fixture Successfully added</br>";
}
else {
echo "We are sorry no Fixture inserted ";
}
?>