Click here to Skip to main content
15,889,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In the following code nothing printed because $date take the first empty value for date input, how can i solve this problem :
PHP
<?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;

}

}}
?>
Posted
Updated 27-Jan-14 4:39am
v2
Comments
Mohibur Rashid 27-Jan-14 20:09pm    
Line 13, $_post is invalid. It should be $_POST
Killzone DeathMan 11-Feb-14 9:06am    
Agree

1 solution

If I were you i put three text box separately for year and month and day and in server concat them and make the real date
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900