-5

私の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 ";
}
 ?>
4

2 に答える 2

2
include_once("connect.php");?>

そこにあってはならない追加の PHP 終了タグがあります。行を次のように置き換えます。

include_once("connect.php");
于 2013-04-29T15:00:16.083 に答える