Re: Help-Updating multiple records

From: Date: Fri, 22 Sep 2000 09:16:44 +0000
Subject: Re: Help-Updating multiple records
Groups: php.general 
Request: Send a blank email to php-general+get-17408@lists.php.net to get a copy of this message
Addressed to: am33@cornell.edu php-general@lists.php.net ** Reply to note from am33@cornell.edu Thu, 21 Sep 2000 15:54:16 -0400 > > I'm not sure if this is more of a PHP or MySQL question, but I'm hoping = > I can get some help with it here. > > I've got a form being generated from a MySQL query that shows several = > record names and makes an input box for each record. After it, there's a = > submit button. My problem is I can't figure out how to make it update = > the field of each of the records shown from the data in the input boxes = > by just pressing the one submit button. > > > So I want to update all the "quality" fields of each of the displayed = > records. I know this doesn't work as-is, but if anyone has any ideas of = > how I might be able to do that with just the one submit button, I'd love = > to hear it. Thanks. > I think you are doing this: <FORM action="<?=$PHP_SELF"?> method="Post"> <!-- record 1 --> <INPUT TYPE="SUBMIT"> </FORM> <FORM action="<?=$PHP_SELF"?> method="Post"> <!-- record 2 --> <INPUT TYPE="SUBMIT"> </FORM> <FORM action="<?=$PHP_SELF"?> method="Post"> <!-- record 3 --> <INPUT TYPE="SUBMIT"> </FORM> Each submit button only sends data withing its own <FORM>, ignoring the rest of the page. It should end up something like this... <FORM action="<?=$PHP_SELF"?> method="Post"> <!-- record 1 --> <!-- record 2 --> <!-- record 3 --> <INPUT TYPE="SUBMIT"> </FORM> Note: there is only one <FORM> and button. You will have to name your fields somehow so you can tell which record they belong with. Rick Widmer Internet Marketing Specialists www.developersdesk.com

« previous php.general (#17408) next »