I'm trying to run this code but it's not working.
$sql = "SELECT * FROM cliente WHERE id = $id ";
$limite = mysql_query("$sql");
while ($sql = mysql_fetch_array($limite)){
$nome = $sql["nome"];
$telefone = $sql["telefone"];
$id = $_GET['id'];
echo "<div class='clientecelula'>" ;
echo "$nome";
echo "<span class='telcelula'> $telefone </span>";
echo "<span class='semcelula'> </span>";
echo "</div>" ;
}
I'm getting the error:
Notice: Undefined variable: id in /Applications/XAMPP/xamppfiles/htdocs/ross/semana.php on line 7
Warning: mysql_fetch_array () expects parameter 1 to be resource, boolean given in /Applications/XAMPP/xamppfiles/htdocs/ross/semana.php online 12
What's the problem here?