我正在尝试在数据库中存储时间戳。 HTML 代码:
<form action="insert.php" method="POST"/>
<style>
p{
float:center;
}
</style>
<Font color=red > <center>Support or Analysis Tracker (SoAT) </center></Font>
</br>
</br>
<p align="left">
<label for="PROCESS"><FONT color=default>Analysis/Support</label>  </t>
<select id="PROCESS" name="PROCESS">
<option value="Analysis">Analysis</option>
<option value="Support">Support</option>
</select>
         
<label for="SO_NUMBER"><FONT color=default>SO_Number</label>
<input type="text" id="SO_NUMBER" name="SO_NUMBER" value ="SO_" required/>
         
<label for="PERSON_INCHARGE"><FONT color=default>Person_Incharge</label>
<input type="text" id="PERSON_INCHARGE" name="PERSON_INCHARGE" required/></br>
</br></br>
</br>
</p>
<p align="left">
<label for="DESCRIPTION"><FONT color=default>Description</label>
<input type="text" id="DESCRIPTION" name="DESCRIPTION" />
</p>
</br>
</br>
<div style="text-align:center">
<button>
<img alt="ok" src=
"http://www.blueprintcss.org/blueprint/plugins/buttons/icons/tick.png" />
INSERT
</button>
</fieldset>
</form>
点击插入按钮后,我需要将当前时间和日期存储在数据库中。后台数据库结构如下:
最佳答案
在这些情况下,您可以使用 mysql 的 from now() 函数。
Insert INTO tablename(RECEIVED) VALUES(now())
通过这个结构,它使用来自 mysql 服务器的日期和时间
关于php - html 中的时间戳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37427961/