how to create edit form .and update user data my table is;
id int auto_increment
Name
Department
Problem
Ext_no
Ip_Add
Remark
Email
Status (set)
My view table code is ;-
<?php
//connects to database
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("users", $con);
//select table
$select = mysql_query("SELECT * FROM entryform") or die('No table exist!');
$numrows = mysql_num_rows($select);
echo <<<EOM
<table border='1'>
<tr>
<th>Complaint No.</th>
<th> Name</th>
<th>Department</th>
<th>Problem</th>
<th>Ext no.</th>
<th>IP Add</th>
<th>Remark</th>
<th>Email</th>
<th>Status</th>
</tr>
EOM;
while ($row = mysql_fetch_assoc($select))
{
echo <<<EOM
<tr>
<td>{$row['id']}</td>
<td>{$row['Name']}</td>
<td>{$row['Department']}</td>
<td>{$row['Problem']}</td>
<td>{$row['Ext_no']}</td>
<td>{$row['Ip_Add']}</td>
<td>{$row['Remark']}</td>
<td>{$row['Email']}</td>
<td>{$row['status']}</td>
<td><a href='edit.php'>Edit</a> <a href='delete.php'>Delete</a></td>
</tr>
EOM;
}
echo <<<EOTABLE
</table>
EOTABLE;
?>