次のコードを実行すると、添付イメージの黄色で強調表示されたクエリがページに印刷されます。私はそのSQLを印刷したくありません。私のコードセグメントで何が間違っていますか?sqlクエリが実行時に印刷されます
if(isset($_REQUEST["stu_performance_activity_submit"]))
{
$stu_performance_main_category = $_REQUEST["stu_performance_main_category"];
$stu_performance_sub_category = $_REQUEST["stu_performance_sub_category"];
$stu_performance_activity_name = $_REQUEST["stu_performance_activity_name"];
$stu_performance_activity_date = $_REQUEST["stu_performance_activity_date"];
$stu_performance_activity_description = $_REQUEST["stu_performance_activity_description"];
$newc = "INSERT INTO stu_performance_activity
(stu_performance_activity_id,
stu_performance_main_category,
stu_performance_sub_category,
stu_performance_activity_name,
stu_performance_activity_date,
stu_performance_activity_description)
VALUES ('',
'$stu_performance_main_category',
'$stu_performance_sub_category',
'$stu_performance_activity_name',
'$stu_performance_activity_date',
'$stu_performance_activity_description')";
if($connection->query($newc) === TRUE)
{
}
else
{
echo "Error: " . $newc . "<br>" . $connection->error;
}
}
印刷のような方法でのような便利なwrrorメッセージをクエリを書き直し '$ Connection(接続) - > Connect ERROR' – RiggsFolly
あなたはこの問題を解決し、' <?php'タグ – RiggsFolly
でPHPコードを開始しています。私は<?phpを追加するのを忘れました。代わりに、.ありがとう@ RiggsFolly! –