Why cannot call the div #popup1? I want to pass the $row['staffId'] to div and call the popup to show the information .
$result = mysql_query("SELECT * FROM Staff WHERE companyId='$companyIdResult'");
echo "<div>
<table >";
while($row = mysql_fetch_array($result)){
echo "<tr>";
echo "<td >" . $row['staffName'] . "</td>";
echo "<td>" . $row['staffPhone'] . "</td>";
echo "<td><a class ='editbutton' href=' #popup1?edit_id=".$row['staffId'] ."'>Edit</a></td>";
echo "</tr>";
}
echo "</table>";
echo "</div>";
if($_GET['edit_id'] != ""){
$staffId = $_GET['edit_id'];
$sql2 = mysql_query("SELECT *FROM Staff WHERE staffId='".$staffId."'");
echo '<div id="popup1" class="overlay" >';
echo '<div class="popup">';
echo '<input type="text" name="staffName" value= ".$row['staffName']." ><br>';
echo '<input type="text" name="staffPhone" value=".$row['staffPhone']."><br>';
echo '</div>';
echo '</div>';
}