For some reason it does not save it, the $ _POST receives it correctly, but in the save function where I execute the SQL it does not do not understand why the function is this
function guardar_dominio($input, $conn)
{
if(isset($input['id']) && $input['id']!=""){
$sql ="UPDATE dominios SET dominio='".utf8_decode($input['dominio']).
"', renovacion='".utf8_decode($input['renovacion']).
"', registrado='".utf8_decode($input['registrado']).
"', estado= 1".
", status= 1".
" WHERE id=".$input['id'];
$conn->execute($sql);
}else{
var_dump($input);
$sql = "INSERT INTO dominios (dominio, renovacion, registrado, estado, status) VALUES ('"
.$input['dominio']."', '"
.$input['renovacion']."', '"
.$input['registrado']."', "
."1, 1)";
$conn->execute($sql);
var_dump($sql);
}
}
the quality of the code is something old because when I work they do not know how to work with objects but well, the fact is that I do not understand the reason, I do the vardump($sql)
and the INSERT is correct someone Would you know how to solve it?