我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何将HTML5时间属性输入保存到My SQL

Hi I have a problem with HTML5 time attribute.

My code looks like this,

 <input type="time" name="e_time">

the sample output is looks like this

[e_time] => 19:08

It gives an array in 24 hours format. But the problem is My SQL is not accepting this in "time " data type. How do I do this? I tried adding

$time2 = $_POST["e_time"] . ":00";

and added :00 for the end of the string but it still fails. can anyone suggest me how to solve this? Thanks!

近期文章

  • too long
  • Heroku postgres ingress - 无法连接到服务器错误
  • 获取在给定日期之前的一周的开始和结束日期[重复]
  • 用于HTML和CSS的PHP DOM解析器
  • 比较php和oracle中的日期
  • 如何比较表格并获得差异
  • 最新帖子Facebook页面整合到网站
  • serialize()和unserialize()混淆和转义
  • 调度程序无法正常工作
  • 如何使用phpmysql表单插入多个数据?
  • 无法让我的PHP Form Mailer工作
  • 如何使用php,mysql更新数据库中的表单数据
  • 如果用户从表中填写所有3个显示选择值,并且填充2个指定字段显示所有值,则表单中有3个字段
  • php没有在服务器上运行
  • too long
  • 如何在2小时之间从mysql中检索计数
  • 我只从mysql查询中获取最后一条记录
  • 'where子句'中的未知列'member1'
  • 求助采用subprocess.communicate控制命令行程序时卡死
  • 修改上面的代码解决哲学家用餐死锁问题

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华