按提交时从日期输入中获取值 [英] Get the value from the date input when press submit
本文介绍了按提交时从日期输入中获取值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在下面的代码中没有打印,因为$ date占用日期输入的第一个空值,我该如何解决这个问题:
In the following code nothing printed because $date take the first empty value for date input, how can i solve this problem :
<?php
$connection=@mysqli_connect('localhost','root','','ijcot');
if(isset($_POST['empno']))
{ $empno=$_POST['empno'];//take employee number
if($result = mysqli_query($connection,"SELECT * FROM emp_mas where e_no=$empno"))//show the result depending on the employee number
{
$query_row=mysqli_fetch_array($result);
echo "<form method=POST>";
echo "<br>"."<br>".""."Date of OT:".""."<input type=date name=date>";
echo "<br>"."<br>"."<html>"."<input type=submit name=OK value=OK style=width:50 >"."</html>";
"</from>";
if(isset($_post['date']))
{
$date=$_post['date'];
echo $date;
}
}}
?>
推荐答案
date取日期输入的第一个空值,我该如何解决这个问题:
date take the first empty value for date input, how can i solve this problem :
<?php
connection = @ mysqli_connect(' localhost', root',' ',' ijcot'跨度>);
if(isset(
connection=@mysqli_connect('localhost','root','','ijcot'); if(isset(
_POST [' empno']))
{
_POST['empno'])) {
这篇关于按提交时从日期输入中获取值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文