Dear Experts,

I have following codes

PHP Code:
$sql "SELECT * from contacts order by name" ;
$select mysqli_query($con,$sql);
$row=mysqli_num_rows($select);
//echo ($row);
while($row mysqli_fetch_array($select))
{
    echo 
"<tr>";
    echo 
"<td> <a href='edit.php?id=".$row['id']."'>
    <img border=noborder src=images/pencil.png title=Display></a></td>"
;
    echo 
"<td align='left'> " $row["name"].  "</td>";
    echo 
"<td> " $row["moba"]. "</td>";
    echo 
"<td> " $row["city"]. "</td>";
    echo 
"<td> " $row["country"] . "</td>";
    echo 
"</tr>";
}
?>        </tbody>
       </table> 
and Edit.php has this data

PHP Code:
<?php
    
require_once("connect.php");
        
$sno =$_GET['id']; 
        
$query ="SELECT * FROM contacts WHERE id = $sno ";
        
$result=mysqli_query($con$query);
        
        if (
$result){
            
                  while (
$row mysqli_fetch_array($result))
                  {
               echo 
$row['name']."<br>";
                  echo 
$row['moba'];
                  }
                 }else{
              echo 
"no data found";
          }
?>
I press a link then related data must appear in related textboxes against selected id like shown in image

http://i41.tinypic.com/2qdmo3m.jpg

Please help