$conn = mysqli_connect('localhost','username','password','database');
if(!$conn) {
exit('Connection failed, and I\'m not gonna tell the public why because the error_log should be the only thing that should carry such information! And the error_log is also not made accessible via Apache!');
}
if(isset($_GET['lime'])) {
$lime = $_GET['lime'];
$lime = mysqli_real_escape_string($conn, $lime);
}
else {
$lime = '';
}
if(isset($_GET['fruit'])) {
$fruit = $_GET['fruit'];
$fruit = mysqli_real_escape_string($conn, $fruit);
}
else {
$fruit = '';
}
$query = mysqli_query($conn, "SELECT something FROM table WHERE something='$lime' AND apple='$fruit'");
$result = mysqli_fetch_assoc($query);
echo $result;