I am creating a data listing system, and I created a data change page, with 6 fields, name, experience, email, phone, city and bio. but my function does not update the fields. The data arrives in function change_data () but does not update in the database. Just the field experience updates.
function Altera_Dados(){
$retorno="";
$conecta = DBConnect();
if(isset($_POST["atualiza"])){
$Nome = $_REQUEST['DadoNome'];
echo $_REQUEST['DadoNome'];
$experiencia = $_POST['experiencia'];
echo $_POST['experiencia'];
$email = $_POST['email'];
echo $_POST['email'];
$telefone = $_POST['telefone'];
echo $_POST['telefone'];
$cidade = $_POST['cidade'];
echo $_POST['cidade'];
$id = $_POST['id'];
//$biografia = $_POST['biografia'];
$query ="UPDATE cadastro3 SET nome = '$Nome',experiencia='$experiencia',email='$email' where id ='$id'";
$retorno = mysqli_query($conecta,$query)or die ('Erro na consulta ::. '. mysqli_error($conecta));
}
DBClose($conecta);
return $retorno;
}
I used the ID ai the following message appears: mysqli_num_rows () expects parameter 1 to be mysqli_result, boolean given in C: \ xampp \ htdocs \ BuildersFree \ Dozero \ System \ funcoes.php on line 284 Warning: Not updated!