title: Warning: mysqli_query() expects at least 2 parameters, 1 given in in my php file
body: <p>i am trying to write a code in php code  for update a table but i am getting a waring here   why i am getting  this warning here </p>
  
  <p>Here is my code</p>
  
  <pre><code>$con=mysqli_connect("localhost","root","root","clothing");
  // Check connection
  if (mysqli_connect_errno()){
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
  
  if(isset($_POST['change'])){
      $email=$_POST['email'];
      $sql="SELECT *from userdetails WHERE userId='$userid'";
  
      $query = mysqli_query($con, $sql);
      $count=mysqli_num_rows($query);
      $row=mysqli_fetch_array($query);
      if ($count &gt; 0){
          echo $row["Password"];
          echo  $_POST["currentPassword"];
          if($_POST["currentPassword"] == $row["Password"]) {
              echo "fine";
          if( $_POST["confirmPassword"]== $_POST["newPassword"]){
              mysqli_query("UPDATE userdetails SET Password='anil' WHERE ID=30");
              echo "good";
          }
      }
  } 
  </code></pre>
  
  <p>How can i get my desired output </p>
  
  <p>Thanks in advance</p>