On Mon, Sep 29, 2003 at 01:43:08PM +0200, Angelo Zanetti wrote: : : Marek Kilimajer suggested: : > : > Angelo Zanetti wrote: : > > : > > I have a table that is populated from a database which gets the : > > IDs of the records from a php array.Every row in the table has a : > > checkbox next to the actual record, what I want to do is to allow : > > the user to select the records they want to remove by clicking the : > > checkbox(es) and then click a button to submit the form. : > > : > > so how do I remove these records? : > : > Simple: : > foreach($_POST['del_checkboxes'] as $id) { : > $sql="delete from table where id='$id'"; : > } : : I dont actually want to delete the record from the database, perhaps I : wasnt very clear in my explanation, but I just need to remove that : entry from the table.
To remove a record is to delete a row. Same thing. When you say "entry", do you mean "record" or "row"? Or do you mean something else? If you want to change "one or more columns of a row" (this can also be stated as "one or more fields of a record"), use the SQL command "UPDATE <table> SET col1=expr1,col1=expr2,... WHERE ID=id_expr". -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php