title: Check user password and create new
body: <p>I trying to make a script so i have a little problem with this.
  I have Old Password &lt;- Want to check this in mysqli it is same or not and after this create new one. </p>
  
  <p>This working but i have problem with check password when i put same password i have again showed this password is not correct .. any help ? 
  My script </p>
  
  <pre><code>&lt;?php 
  if(isset($_POST['ilkm_save_password']))
  {
  $old_password = mysqli_real_escape_string($con, $_REQUEST['ilkm_old_password']);
  $old2_password_control = mysqli_real_escape_string($con, $_SESSION['password']);
  $password1 = mysqli_real_escape_string($con, $_REQUEST['ilkm_new_password']);
  $password2 = mysqli_real_escape_string($con, $_REQUEST['ilkm_repeat_new_password']);
  $username = mysqli_real_escape_string($con, $_SESSION['username']);
  
  if($old_password &lt;&gt; $old2_password_control){
      echo "&lt;h5&gt;&lt;i class='icon icon-info-circle'&gt;&lt;/i&gt; &lt;b&gt;Girdiğiniz Mevcut Şifre Yanlış, Lütfen Mevcut Şifrenizi Kontröl Edin!&lt;b&gt;&lt;/h5&gt;";
  }
  else if ($password1 &lt;&gt; $password2)
  {
      echo "&lt;h5&gt;&lt;i class='icon icon-info-circle'&gt;&lt;/i&gt; Şifreler Uyuşmuyor!&lt;/h5&gt;";
  }else if($password1 == 0){
  echo "Lutfen Bir Yeni Sifre Girin!";
  }else if($password2 == 0){
  echo "Lutfen Sifreyi Tekrarlayin!";
  }
  else if (mysqli_query($con, "UPDATE ilkmoon_users SET password='".md5($password1)."' WHERE username='$username'"))
  {
      echo "&lt;h5&gt;&lt;i class='icon icon-info-circle'&gt;&lt;/i&gt; Şu anda giriş yaptığınız yer hariç, Diğer Bilgisayarlardan, Telefonlardan, Tabletlerden ve profile giriş yaptığınız her yerden çıkış yapıldı!.&lt;/h5&gt;";
      header( "Refresh:3; url=".ilkm_site_link."/ilkm-user-cp", true, 303);
  }
  else
  {
      mysqli_error($con);
  }
  mysqli_close($con);
  
  }
  
  ?&gt;
  &lt;form method="post" enctype="multipart/form-data"&gt;
          &lt;label&gt;&lt;i class="icon icon-lock"&gt;&lt;/i&gt; Mevcut Şifre &amp;#x21B4;&lt;/label&gt; 
          &lt;input type="password" name="ilkm_old_password" class="form-control"  /&gt;
          &lt;br /&gt;
          &lt;label&gt;&lt;i class="icon icon-lock"&gt;&lt;/i&gt; Yeni Şifre &amp;#x21B4;&lt;/label&gt;   
          &lt;input type="password" name="ilkm_new_password" class="form-control"  /&gt;
          &lt;br /&gt;
          &lt;label&gt;&lt;i class="icon icon-lock"&gt;&lt;/i&gt; Yeni Şifreyi Tekrarla &amp;#x21B4;&lt;/label&gt;    
          &lt;input type="password" name="ilkm_repeat_new_password" class="form-control"  /&gt;
          &lt;br /&gt;
          &lt;center&gt;&lt;button type="submit" name="ilkm_save_password" class="btn btn-sm btn-success"&gt;&lt;i class="icon icon-lock"&gt;&lt;/i&gt; Şifreyi Güncelle&lt;/button&gt;&lt;/center&gt;
  &lt;/form&gt;
  </code></pre>