All the "date" in my database are of the following format: 'd-m-Y' (E.g. 09-03-2022)
I want have a field with input type=date, so user can modify the date.
I use the following code to pull data:
$date = "<input type=\"date\" id=\"date\" size= \"50%;\" name=\"date\" value=\"$res[date]\" >";
...
<thead> <th>Date </th> <td>$date </td> </thead>
But my inputbox is showing dd/mm/yyyy instead of the actual date.
What formatting do I need to do to make my actual date show on the inputbox?
I have tried the following but doesn't work:
$date = "<input type=\"date\" id=\"date\" size= \"50%;\" name=\"date\" value=\"date('d-m-Y',$res[date])\" >";