title: couldnt fetch mysqli_query
body: <p>I currently working in the update function for my website using php and mysql</p>
  
  <p>pic 1
  <a href="https://i.stack.imgur.com/YZd52.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YZd52.png" alt="enter image description here"></a></p>
  
  <p>when i click on the edit button, it will redirect me to the edit page to update user details.</p>
  
  <p>pic2
  <a href="https://i.stack.imgur.com/DjU2x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DjU2x.png" alt="enter image description here"></a></p>
  
  <p>it suppose to show the data that fetch from database in pic1 in the empty text box that i created in pic2.</p>
  
  <p>But the error pop-up there (as you can see in pic2).</p>
  
  <p>and here is my code to catch user details from database :</p>
  
  <pre><code>&lt;?php
  $test= $_GET['userId'];
      echo($test);     //check user id 
          if( isset($_GET['userId']) )
          {
              $id = $_GET['userId'];
              $catchsql = "SELECT * FROM tbluser WHERE userId='$id'";
              $res= mysqli_query($con,$catchsql);     //this is line 89
              $row= mysqli_fetch_array($res);     //this is line 90
          }
  </code></pre>
  
  <p>can anyone help me with this ? Thanks a lot. </p>