Re: Re: How to $_POST from a grid
| From: | Stuart Felenstein | Date: | Wed, 24 Nov 2004 20:29:53 +0000 |
| Subject: | Re: Re: How to $_POST from a grid | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-202795@lists.php.net to get a copy of this message | ||
--- Daniel Schierbeck <dasch@ulmail.net> wrote:
> I'd go with a POST form and a JavaScript
>
> <form name="grid" method="post">
> <input type="hidden" name="primary_id" />
> <input type="button"
> onclick="document.grid['hidden'].value='123'"
> value="foobar" />
> </form>
>
Yes , that is exactly what I'm doing but it's
returning only the last record.
So here below is an example of the grid results.
with $_GET I click on one of the returns under
primaryID, if I choose 1stRecord, 1stRecord comes up
in the update form. If I choose 3rdRecord, 3rdRecord
come s up in the update form.
With $_POST, and i have a form, tried it around each
record, around the whole grid , doesn't seem to
matter.
Regardless of choosing 1st 2nd or 3rd, 3rd is the one
that comes up in the udpate form.
+----------+-----------+-----------+--------------+
|PrimaryID | Field2 | Field3 | Field3 |
+----------+-----------+-----------+--------------+
+----------+-----------+-----------+--------------+
|1stRecord | xxxxxx | xxxxxx | xxxxxx |
+----------+-----------+-----------+--------------+
+----------+-----------+-----------+--------------+
|2ndRecord | xxxxxx | xxxxxx | xxxxxx |
+----------+-----------+-----------+--------------+
+----------+-----------+-----------+--------------+
|3rdRecord | xxxxxx | xxxxxx | xxxxxx |
+----------+-----------+-----------+--------------+
Stuart