I have this code:
$tabela5 .= '<td> <input type="datetime-local" name= "DataInicio" id= "DataInicio" value="'. date("Y-m-d H:i:s") .'"></td>';
But the input does not show the current date and time.
I have this code:
$tabela5 .= '<td> <input type="datetime-local" name= "DataInicio" id= "DataInicio" value="'. date("Y-m-d H:i:s") .'"></td>';
But the input does not show the current date and time.
Switch to this:
date("Y-m-d\TH:i:s")
HTML should have a T
between the date and time. \
is to escape it