I have got an error message in php like this "undefined index id in line no:", I have using the following code
$id='$_REQUEST[id]';
            $sql = "SELECT * FROM country";
            $result = $con->query($sql);
            $i=1;
            foreach($result as $row)
            {
                ?>
             <li><a href="data.php?id=<?php echo $row['id'] ?>"><?php echo $row['name'] ?> </a></li>   
                 <?php
                $i++;
            }
            ?>
For listing the following code i have used
<?php
if(isset($id))     {   
   $queryImg = "SELECT * FROM data WHERE country='$_REQUEST[id]'"; 
   $resultImg = mysqli_query($con,$queryImg);
   $rowResult = mysqli_num_rows($resultImg);
   while($rowsImg = mysqli_fetch_array($resultImg)){ ?>
I do not have enough experience in php, so can you please check this code and tell me how to solve this.
 
     
     
    