I have MYSQL incoming data in HTML form inputs at page opening. When I press the update button after changing the information, the update operation is successful, but the data is not updated.
<?php
$servername = "";
$username = "";
$password = "";
$dbname = "";
$baglan = mysqli_connect($servername,$username,$password,$dbname) or die(myslqi_error());
$place = $_POST['n_place'];
$description = $_POST['n_description'];
$latitude = $_POST['lat'];
$longitude = $_POST['long'];
$kayitliyer = $_POST['search_new_places'];
$yetkiliad = $_POST['n_yetkiliad'];
$magazaad = $_POST['n_magazaad'];
$telefon = $_POST['n_telefon'];
$yetkilitelefon = $_POST['y_telefon'];
$derece = $_POST['derece'];
$country = $_POST['country'];
$sql = "UPDATE tbl_places SET place='$place',description='$description',lat='$latitude', lng='$longitude', kayitliyer='$kayitliyer',
yekiliad='$yetkiliad', magazaad='$magazaad', telefon='$telefon', yetkilitelefon='$yetkilitelefon', derece='$derece' WHERE place_id='$gID' ";
if (mysqli_query($baglan,$sql)) {
echo '<br/><div class="container"><div class="alert alert-success" role="alert">
Kayıt Güncelleme <b>Başarılı :-)</b> <a href=javascript:history.back(-1)>Geri Dön</a>
</div></div> ';
}else {
echo '<br/><div class="container"><div class="alert alert-danger" role="alert">
Güncelleme İşlemi <b>Başarız!</b> <a href=javascript:history.back(-1)>Geri Dön</a>
</div></div>'. mysqli_error($baglan);
}
?>
HTML Page Form SELECT Query.Thanks for your reply. I get the value of "$ gID" from the HTML form page, where I entered the DB data with a SELECT query.UPDATE
<?php
//UPDATE ID
$gID = $_GET["place_id"];
include ("baglanti.php");
$sorgu = mysqli_query($baglan,"select * from tbl_places where place_id='$gID'");
while($goster = mysqli_fetch_array($sorgu)){
$grupadi = $goster["place"];
$id = $goster["place_id"];
$desc = $goster["description"];
$adres = $goster["kayitliyer"];
$yetkiliad = $goster["yekiliad"];
$magazaad = $goster["magazaad"];
$telefon = $goster["telefon"];
$yetkilitelefon = $goster["yetkilitelefon"];
$derece = $goster["derece"];
$country = $goster["country"];
$lat =$goster["lat"];
$long = $goster["lng"];
}
?>
<!DOCTYPE html>
<html lang="tr">
<head>