make it one form and name the form elements using [], they will become arrays. example:

<form >
<input type="text" name="name[1]" value=".....">
<input type="text" name="surname[1]" value=".....">

<input type="text" name="name[2]" value=".....">
<input type="text" name="surname[2]" value=".....">

the numbers (1 and 2) are ids of the records. then you loop the array and update the rows:

foreach($_POST['name'] as $id => $null) {
update table set name='{$_POST['name'][$id]}', surname='{$_POST['surname'][$id]}' where id='$id'
}


Chitchyan, Ruzanna wrote:
Hi all
I have the following problem:
I want to allow users to update a number of records either one by one, or all 
together. Currently I have put each record in a separate form on a page and each form 
can be updated separately, but I don't know how to allow simultaneous update of all 
forms (without reverting to JavaScript). Any help is greatly appreciated.
Thanks
Rouza


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to