我有这样的代码:无法插入链接到DB
if (!empty($_POST['w1']) && !empty($_POST['l1'])) {
$str = "<a href='".$_POST['l1']."'>".$_POST['w1']."</a>";
$content = str_replace($_POST['w1'],$str, $content);
}
$content = nl2br($content);
echo "נוסף";
echo $content;
mysql_query("INSERT INTO `posts` VALUES ('','".$_POST['subject']."','$content','0')");
PHP页面不返回任何错误。但数据没有插入到数据库中。 任何人都知道是什么问题?
我只是认为错误报告是关闭的,查询看起来不对我。 –
mysql_query(“INSERT INTO'posts' VALUES('','”。$ _ POST ['subject']。'','{$ content}','0')“); – NLSaini
重新打印错误。我检查了几次查询,没有发现任何错误。 – OfirH