I am trying to convert the input string to a data object of php, to use it on sql, but its not working and I can't find the error, the html is
<div class="form-group ">
<label class="control-label" for="interno">Fecha Limite</label>
<input name="fechalimite" type="datetime-local" class="form-control" id="fechalimite">
</div>
The post method on php does this
$fecha = getA(strtotime("fechalimite"));
$datetime = date("Y-m-d H:i:s",$fecha);
If I use echo fecha show the datetime right but the $datetime
it is just blank, what I am missing?
getA
function getA($campo)
{
return(htmlspecialchars(antiinjection($_REQUEST[$campo]), ENT_QUOTES));
}