 <?php
$servername = "localhost";
$username = "hasanhom_hhdlccaresoft";
$password = "dzsCxPAdH?GT";
$dbname = "hasanhom_hhdlccare";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
  die("Connection failed: " . $conn->connect_error);
}

$sql = "SELECT * FROM tbl_customer_reg";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
  // output data of each row
  while($row = $result->fetch_assoc()) {
    //echo "id: " . $row["customerId"]. " - Name: " . $row["applicant_name"]. " " . $row["email"]. "<br>";
    if(!empty($row["email"])){
      //echo "id: " . $row["customerId"]. " - Name: " . $row["applicant_name"]. " " . $row["email"]. "<br>";  
      echo $row["email"]. ", ";  
    }
    
  }
} else {
  echo "0 results";
}
$conn->close();
?> 