I have database user consist of attribute like name,password,dob and etc. datatype is used to store date is date.while updating, I used to fetch like below
$query="select * from user where email='$user'";
$res=mysqli_query($conn,$query);
$fet=mysqli_fetch_array($res);
<input type="date" id="dob" name="dob" value="<?php if($fet['dob']==00-00-0000){ }else{ echo date($fet['dob']);} ?>">
I want date which is to fetch from database to this above input type date.