$query = "INSERT INTO
" . $this->table_name . "
(data, sexo)
VALUES
(:data,:sexo)";
$stmt->bindValue(':data', $_REQUEST['data']);
$stmt->bindValue(':sexo', $_REQUEST['sexo']);
is giving an error: Undefined index: sexo
.
the sexo
field is radio button
and I did not select it before saving to the database.
if I select the sexo
field, the data is usually saved in the database, why?
wanted to save even if the field is selected or not ...