0
I tried it this way but it doesn’t work
<form action="add.php" method="POST" name="form1">
<div class="w3-section">
<label>Nome do funcionario</label>
<input class="w3-input w3-border" placeholder="Nome" type="text" name="name" required>
</div>
<div class="w3-section">
<label>Horario</label>
<input class="w3-input w3-border" placeholder="Hora" type="text" name="hora" required>
</div>
<div class="w3-section">
<label>Data</label>
<input class="w3-input w3-border" value="<?php echo date('d/m/Y');?>" type="date" name="data" required>
</div>
<button type="submit" class="w3-button w3-padding-large w3-green w3-margin-bottom">Adicionar <i class="fa fa-plus"></i></button>
</form>
he ignores the value part
Thank you so much, but when it sends to the bank send 2018-04-12 know how I can solve this ?
– Gabr13l_Alm31da
You can make the conversion using
strtotime
anddate
as follows: $data_wrong = "2018-04-12"; $data_correct = date("d/m/Y", strtotime($data_wrong));– David Alves
Thank you very much, helped a lot and worked right.
– Gabr13l_Alm31da