Hello all,
Im very new to php ,when I check execute this progrm the values from the database are retrieving and didplyed in a row.When I click the particul;ar edit button of a row ,I should take a vlue($id),by which I can edit that prticula data.what i should do?
plese help.
<html>
<body>
<table width="53%" border="0" cellspacing="5" cellpadding="0" align="left">
<form method='post'>
<?php
include("dbconnect.php");
$res=mysql_query("select * from addemployee ");
echo"<table border='1'>
<tr>
<th>name</th>
<th>platform</th>
<th>designation</th>
<th>id</th>
<th>taddr</th>
<th>paddr</th>
<th>email</th>
<th>idcno</th>
<th>phno</th>
<th> update<th>
</tr>";
while($row=mysql_fetch_array($res))
{
echo "<tr>";
echo "<td> " . $row['name'] . "</td>";
echo "<td> " . $row['platform'] . "</td>";
echo "<td> " . $row['designation'] . "</td>";
echo "<td> " . $row['id'] . "</td>";
echo "<td> " . $row['taddr'] . "</td>";
echo "<td> " . $row['paddr'] . "</td>";
echo "<td> " . $row['email'] . "</td>";
echo "<td> " . $row['idcno'] . "</td>";
echo "<td> " . $row['phno'] . "</td>";
echo "<td>
<input type='button' name='Edit' value='Edit' onclick= self.open("second.php")>
<input type='button' name='Edit' value='Dlete' onclick=window.open('delelte.php')>
</td>";
echo"</tr>";
}
echo "</table>";
?>
</form>
</table>
</body>
</html>
regards,
ramya