Modify db via php/html form

Hello to everyone!
I need a mode to modify (edit) and update the db via a php/html form. I have now a mode to insert and delete form but i don;t know how to proceed for a update form. Can someone help me please?

Thank you in advance!

How do you mean by ‘mode’? Actually to modify row(s) in database (i presume you are using mysql), you just need to prepare a update statement and execute with a php function mysql_query(). If you are not known to the update statement it looks like this.


$id = 10;// this value can be dynamic by passing from query string or form
$sql = "UPDATE tblname SET columname='NewValue', columnname2='NewValue' WHERE id=$id";
mysql_query($sql) or die(mysql_error());

This will update a single record in the table. Where clause will determine what rows to update and you can put various number of columns.