PHP update SQL nothing happens

0

Well, I need some help. I'm getting around this problem almost 1 day. In this Code that makes the data update for phpmyadmin does not change anything but also gives me no error.

<?php
// definições de host, database, usuário e senha
$conn = mysql_connect("localhost", "root", "");
mysql_select_db("navegador", $conn);
//$id = $_GET['id'];

$ID = $_POST["ID"];

$Nome = $_POST["Nome"];

$NumeroBI = $_POST["NumeroBI"]; 

$Morada = $_POST["Morada"]; 

$Telefone = $_POST["Telefone"];

$DataNasc = $_POST["DataNasc"]; 

$Email = $_POST["Email"];

$Password = $_POST["Password"];

$is_admin = $_POST["is_admin"];

$sqlupdate ="update tb_utilizador SET Nome='$Nome', NumeroBI='$NumeroBI', Morada='$Morada', Telefone='$Telefone', DataNasc='$DataNasc',
            Email='$Email', Password='$Password', is_admin='$is_admin' WHERE ID='$ID' " or die (mysql_error());;
    
asked by anonymous 15.06.2016 / 23:56

1 answer

1

Replace your code where it has "$ sqlupdate" with it, it might work.

$sqlupdate ="update tb_utilizador SET Nome='".$Nome."', NumeroBI='".$NumeroBI."', Morada='".$Morada."', Telefone='".$Telefone."', DataNasc='".$DataNasc."',Email='".$Email."', Password='".$Password."', is_admin='".$is_admin."' WHERE ID='".$ID."' ";
mysql_query($sqlupdate) or die (mysql_error());
    
16.06.2016 / 00:06