i stored date using <input type="datetime-local"> in the database now i want to get back the date in <input type="datetime-local"> for update purpose.
i am doing
$query="select * from exam_schedule where subject_name='$name' AND class_id='$schedule_id' limit 1";
$result= mysqli_query($connection,$query);
while ($read_all_data = mysqli_fetch_assoc($result))
{
echo "date comming from datebase::".$date=$read_all_data['date_and_time']."<br>";
echo "duration comming from datebase::".$duration=$read_all_data['duration'];
$duration=$read_all_data['duration'];
echo "<form method='post' action='edit_schedule.php'>";
echo "<input type='hidden' name='id' value='$id'>";
echo "<tr><th><input type='datetime-local' name='date' value='$date'> </th>";
echo "<th><input type='datetime-local' name='duration' value='$duration'> </th>";
echo <input type='submit' name='update' value='update'> </form></th></tr>";
}
when i echo the $date and $duration it shows me values but when i put value="$date" it doesnot show me date from database.

echo $date?echo "<th><input type='datetime-local' name='duration' value='$duration'> </th>"; <input type='submit' name='update' value='update'> </form></th></tr>";and error reporting would've told you that. Missing anecho ".