Estou recebendo os seguintes erros quando abro a pagina de "altera-formulario-cliente
Notice: Undefined index: id in C:\xampp\htdocs\operacoes\altera-formulario-cliente.php on line 5
Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\operacoes\funcao.php on line 40
Código altera formulário cliente
<?php
include("conexao.php");
include("funcao.php");
$id = $_GET['id'];
$cliente = buscarCliente($conexao, $id);
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Alterar Cliente</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
</head>
<body>
<h1 class="text-center">Formulário de Cliente</h1>
<form method="post" action="adicionaCliente.php">
<div class="container">
<input type="hidden" name="id" value="<?=$cliente['id']?>">
<label class="form-group">Nome:</label>
<input class="form-control" name="nome" type="text" value="<?=$cliente['nome']?>">
<br/>
<label class="form-gruop">Email</label>
<input class="form-control" name="email" type="email" value="<?=$cliente['email']?>">
<br/>
<button type="submit" class="btn btn-info">
<span class="glyphicon glyphicon-print" aria-hidden="true"></span>Salvar
</button>
</div>
</form>
</body>
</html>
função com local do erro
function buscarCliente($conexao, $id) {
$query = "select * from clientes where id = {$id}";
$resultado = mysqli_query($conexao, $query);
return mysqli_fetch_assoc($resultado);
}