antwan
2/9/2020 - 5:51 PM

Select from database

<?php
$sql = "SELECT * FROM users ORDER BY active asc";
$result = $conn->query($sql);
if($result->num_rows > 0) {
  while($row = $result->fetch_assoc()) {
  
  }
} else {
  echo "Connection failed or no records found";
}
?>