Show data with link

Dear Experts,

I have following codes

[php]$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 “

”;
echo " <a href=‘edit.php?id=".$row[‘id’]."’>
";
echo " " . $row[“name”]. “”;
echo " " . $row[“moba”]. “”;
echo " " . $row[“city”]. “”;
echo " " . $row[“country”] . “”;
echo “”;
}
?>

[/php]

and Edit.php has this data

[php]<?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";
	  }

?>[/php]

I press a link then related data must appear in related textboxes against selected id like shown in image

Please help

What are you having trouble with?

Sir as you can see in image, i drew a line from hyperlink to textbox. When hyperlink will be pressed then current id’s data must appear into related textboxes in left side pannel.

Sir I want to show data under id into textboxes.

[php]echo "

<a href=‘edit.php?id=".$row[‘id’]."’>
";[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service