title: failed in count rows in php sql
body: <p>Thank you in advance!
  Please tell me! what is mistake in this code. I want to show total rows of sql on my site. I searched many of codes be like this but all failed. Please help me.</p>
  
  <pre><code>$servername = "localhost";
  $username = "root";
  $password = "";
  
  // Create connection
  $conn = new mysqli($servername, $username, $password, 'sahiwalservices');
  
  // Check connection
  if ($conn-&gt;connect_error) {
  die("Connection failed: " . $conn-&gt;connect_error);
  }
  echo "hunnysheikh99";
  
  ;
  
  mysqli_select_db("sahiwalservices", $conn);
  
  $result = mysqli_query("select count(1) FROM login");
  $row = mysqli_fetch_array($result);
  
  $total = $row[0];
  echo "Total rows: " . $total;
  
  mysqli_close($conn);
  </code></pre>