i have a form which will display the details in a table,when edit button is clicked all the content in the table should come in a form(ie inside the textboxes)..so that the user can edit and save the content again in the database.
1st page
$link=mysql_connect($hostname, $username, $password);
mysql_select_db($dbid) or die("unable to connect");
$line = $_GET;
echo "<table width='50%' border='1'>";
$result=mysql_query("SELECT * FROM hi where name='$line'");
for ($i = 0; $i < 1; ++$i)
{
$line = mysql_fetch_row($result);
print "<tr><td>Name</td><td> $line[0]</td></tr>";
print "<tr><td>age</td><td> $line[1]</td></tr>";
}
echo "</table>";
mysql_close($link);
?>
<form method="post" action="red11.php">
<input type="submit" name="submit" value="submit">
</form>
2nd page
echo "<table width='50%' border='1'>";
$result=mysql_query("SELECT * FROM hi where name='$line'");
for ($i = 0; $i < 1; ++$i)
{
$line = mysql_fetch_row($result);
echo '<input type="text" value="'.$_get[name].'">';
?>
Age<input type="text" name="age">
<input type="submit" name="update" value="update">
<?
}
echo "</table>";