title: Update MySQL using HTML Form input and php
body: <p>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.</p>
  
  <pre><code>&lt;?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 '&lt;br/&gt;&lt;div class="container"&gt;&lt;div class="alert alert-success" role="alert"&gt;
                Kayıt Güncelleme &lt;b&gt;Başarılı :-)&lt;/b&gt; &lt;a href=javascript:history.back(-1)&gt;Geri Dön&lt;/a&gt;
               &lt;/div&gt;&lt;/div&gt; ';
  }else {
    echo '&lt;br/&gt;&lt;div class="container"&gt;&lt;div class="alert alert-danger" role="alert"&gt;
                Güncelleme İşlemi &lt;b&gt;Başarız!&lt;/b&gt; &lt;a href=javascript:history.back(-1)&gt;Geri Dön&lt;/a&gt;
               &lt;/div&gt;&lt;/div&gt;'. mysqli_error($baglan);
  }
  
  
  
  ?&gt;
  </code></pre>
  
  <p>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</p>
  
  <pre><code>  &lt;?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"];
    }
   ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html lang="tr"&gt;
  &lt;head&gt;
  </code></pre>