How to Set Current Date and Time in HTML Input by php

Solution : 

Step1 : echo (new DateTime())->format('Y-m-d'); paste this code in html input value like this :
 
new DateTime())->format('Y-m-d'); ?>">


Step2 : echo (new DateTime())->format('H:i:s'); paste this code in html input value like this :

new DateTime('H:i:s'))->format('Y-m-d'); ?>">


I hope this code will help you enjoy coding

Request a Demo

Whatsapp