我正在尝试将表单值插入数据库,但数据不会进入 mysql。我花了很多时间但无法解决它......这是我的代码:
$query = "insert into $tabl (userid, username, question, board, class, subject, article, status, uniq_id,date,activation ) values('$userid', '$username', '$question', '$board', '$class', '$subject', '$article', 'unread', '$uniq',CURDATE(), '0')";
$row = mysql_query($query);
if($row)
{
header("location:ask-questions.php?msg=saved");
}
else
{
header("location:ask-questions.php?msg=not been saved");
}
////////// (1)End of the Code /////////////
?>
一切都很好,我echo $sql,
也可以正常工作......任何帮助将不胜感激......