Professional Documents
Culture Documents
How To Format Date & Time Input From A PHP Form Into MySQL UNIX Datetime Format
How To Format Date & Time Input From A PHP Form Into MySQL UNIX Datetime Format
</p>
<p>
<label>Time
<input name=Time type=text id=Time value=12:00:00 />
</label>
<label>
<input name=ampm type=radio id=ampm value=am
checked=checked />
am</label>
<label>
<input type=radio name=ampm id=ampm value=pm />
pm</label>
</p>
<p>
<label>
<input type=submit name=Submit id=Submit value=Submit />
</label>
</p>
</form>
An actual application will require additional coding, but this shows a simple way to
format user entered date and time values into MySQL Unix datetime format.