Can anyone help me here about getting the data inside the table cell to be inserted to the MySQL Database?
my code to display tables in html is this. i want now to get the values inside a row by clicking the 'Insert' and submit to submituser.php. help pls.
<?php
$sql=mysql_query("select * from tbluser");
while($row=mysql_fetch_array($sql)){
echo'<td>'.$row['name'].'</td>
<td>'.$row['address'].'</td>
<td>'.$row['$contact'].'</td>
<td><a href="submituser.php">Insert</a></td>
';
}
?>
Output is like this:
| Name | Address | Contact | Action|
|myname|anywhere | 090231 | Insert|
Insert code in html
<td><a href="submitdata.php">Insert</a></td>
submitdata.php Must have this code
$query = insert into tbluser(name, address, contact) values('cellvalue1','cellvalue2','cellvalue3');
Does anyone know how to?