我正在研究一个类似于 Craigslist 的项目,我想在提交表单后将日期导入列“CurrentDate”。我想修复我的代码,因为我确定有几个错误。我没有尝试太多,因为该网站仍在开发中。if(isset($_POST['submit'])) { // Fetching variables of the form which travels in URL $itemname = $_POST['itemname']; $category = $_POST['category']; $subcategory = $_POST['subcategory']; $price = $_POST['price']; if($name !='' || $email !='') { $query = mysql_query("insert into posts(itemname, category, subcategory, price) VALUES (NOW()'$itemname', '$category', '$subcategory', '$price')"); echo "<br/><br/><span>Data Inserted successfully...!!</span>"; } else { echo "<p>Insertion Failed <br/> Some Fields are Blank....!!</p>"; }}我希望在现场导出当前日期。SQL 序列:
2 回答
- 2 回答
- 0 关注
- 118 浏览
添加回答
举报
0/150
提交
取消