Well, what I want to do is print the data that is in two date type fields since I need to make a comparison.
Here are my HTML elements
$html['labels']['fecha'] = "<label for'fecha_filter'>Fecha Inicio</label>";
$html['inputs']['fecha'] = "<input id='fecha_filter' type='date' size='12' maxlength='10' class='date' />";
$html['labels']['fechaFin'] = "<label for'fecha_filter_Fin'>Fecha Fin</label>";
$html['inputs']['fechaFin'] = "<input id='fecha_filter_Fin' type='date' size='12' maxlength='10' class='date' />";
Here I would like to do the echo
case 'fecha':
$sWhere .= "(fecha>= '" . format_date_to_mysql(getDecode($_POST['filter_' . $column])) . "' AND fecha<= '" . format_date_to_mysql(getDecode($_POST['filter_fechaFin'])) . "') ";
echo $sWhere;
break;
I just don't know how to get the value of the html field.
I know that in javascript it can be achieved but I would like if there is some native way through php with which I can know the value of my html objects
When you submit data in a form, the value of the fields is accessible via the attribute
name
, you would have to add this attribute to your fields (there is no need to remove the id attribute and both fields can have the same value):Upon receipt of the form: