title: Cant update values in mysql database php
body: <p>I am trying to update a record on my admin mysql table. But still no changes when i try this method.. I can't see the problem wth this code..</p>
  
  <p>Info.php</p>
  
  <pre><code>&lt;?php
  $query = "SELECT * from admin where username = '{$_SESSION['login_user']}'";
  $result = mysqli_query($conn,$query);
  
  while($row=mysqli_fetch_assoc($result))
      {
            echo '&lt;input type="text" class="form-control" name="user_id" disabled value='.$row['user_id'].'&gt;';
            echo '&lt;input type="text" class = "form-control" name = "lastname"  value='.$row['lname'].'&gt;';
            echo '&lt;input type="text" class = "form-control" name = "firstname"  value='.$row['fname'].'&gt;';
            echo '&lt;input type="text" class = "form-control" name = "middlename"  value='.$row['mname'].'&gt;';
            echo '&lt;input type="text" class = "form-control" name = "address"  value='.$row['address'].'&gt;';
            echo '&lt;input type="text" class = "form-control" name = "contact"  value='.$row['contact'].'&gt;';
            echo '&lt;input type="text" class = "form-control" name = "email_add"  value='.$row['email_add'].'&gt;';
            echo '&lt;input type="text" class = "form-control" name = "username"  value='.$row['username'].'&gt;';
            echo '&lt;input type="password" class = "form-control" name = "password"  value='.$row['password'].'&gt;';
            echo '&lt;input type="password" class = "form-control" name = "confirmPassword" value='.$row['conf_pass'].'&gt;';
      }?&gt;
  
            &lt;button type="submit" class="btn btn-primary" name="update"&gt;Submit&lt;/button&gt;
  </code></pre>
  
  <p>update.php ---- I don't know what's the problem with it.</p>
  
  <pre><code>&lt;?php
  include('pgconnect.php');
  if(isset($_GET['update'])){
      $acctid = $_GET['user_id'];
      $lname = $_GET['lastname'];
      $fname = $_GET['firstname'];
      $mname = $_GET['middlename'];
      $address = $_GET['address'];
      $contact = $_GET['contact'];
      $email = $_GET['email_add'];
      $user = mysql_real_escape_string($_GET['username']);    # use whatever escaping function your db requires this is very important.
      $pass = mysql_real_escape_string($_GET['password']);
      $confpass = mysql_real_escape_string($_GET['confirmPassword']);
          $sql = "UPDATE admin SET lname='$lname', fname='$fname', mname ='$mname', address='$address' contact = $contact, email_add = '$email', username ='$user',password = '$pass', conf_pass = '$confpass' where user_id = '$acctid'";
          $result = mysqli_query($conn,$sql);
              echo "$sql";
                  if($result){
                      echo"Succesully Updated!";
                  }
                      else
                          {
                          echo"Cannot be Updated!";
                      }
          mysqli_close($conn);
      }?&gt;
  </code></pre>