S22 Search result with two fields

S22 Search result with two fields
<!DOCTYPE html>
<html>
<body>

<?php
include("config.php");


$username=$_GET["username"];
$country=$_GET["country"];


    $sql = "SELECT * FROM regform WHERE username LIKE '%$username%' And country LIKE '%$country%'";
    $result = $conn->query($sql);
    if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo "<br> username: ". $row["username"]." - Country: ". $row["country"]."<br>";
    }
} else {
    echo "0 results";
}


$conn->close();
?>

</body>
</html>

Take Your Free Live Demo Class Now

Enter Your DETAILS BELOW

To Get Complete Information or We Will Call You

We Will Send You the Course Fees Details In Below Number

Enter Your DETAILS BELOW

We Will Call Back You Shortly

Enter Your DETAILS BELOW

We Will Call Back You Shortly

Enter Your DETAILS BELOW

Enter Your DETAILS BELOW TO take

free demo class