Capture and record current date in disable field

1

I need to capture the current date in a field that can not be written and then record that date in the database.

<input type="date" class="form-control" id="fecha" name="fecha" disabled="true" value="<?php echo date("Y-m-d");?>">                    

But when registering in the database it does not save it. But if I remove the disabled="true" it saves it but then in the field it can be written.

    
asked by 09.07.2017 в 01:00
source

1 answer

0

you must change the disabled="true" by readonly="readonly"

    
answered by 09.07.2017 / 01:06
source