William Stokes wrote:
Hello,
I have a script which retrieves rows from DB and prints them to a user
editable form to a web page. I don't know how to print the form objects so
that all editable fields are put to arrays for updating them to DB. I have
tried to create arrays sarjanID[] etc. but
I got it working like this:
$counter = 0;
foreach ($arr as $value) { //make the form
...
print "\n";
$counter++;
}
Now I have array $ArrUpdate which contains sub-arrays with the update data.
This can now be processed with another foreach loop
-Will
"Jochem Maas" <[EMAIL PROTECTED]> kirj
Németh Zoltán wrote:
> And how does it work? does it create a sub-array of $_POST?
test it and find out:
echo ''; var_dump($_POST); echo '';
> And is it documented somewhere in the manual?
more than likely.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.ph
Sorry about that...yes it creates an array so...
would create an array accessible from $_POST['names']
foreach($_POST['names'] AS $name){
echo $name;
}
...produces: LarryCurlyMoe
On 1/17/07, Németh Zoltán <[EMAIL PROTECTED]> wrote:
And how does it work? does it create a sub-array of $_PO
And how does it work? does it create a sub-array of $_POST?
And is it documented somewhere in the manual?
Greets
Zoltán Németh
On sze, 2007-01-17 at 10:54 -0500, Mike Smith wrote:
>
>
> *note the [].
>
> --
> Mike
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: h
*note the [].
--
Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On sze, 2007-01-17 at 16:13 +0200, William Stokes wrote:
> But if the form is printed with foreach don't I need some type of counter?
> Otherwise the form that is posted will contain only the data of the last
> iteration of the loop that wrote the original form. right?
>
> -Will
>
so you want
But if the form is printed with foreach don't I need some type of counter?
Otherwise the form that is posted will contain only the data of the last
iteration of the loop that wrote the original form. right?
-Will
""Németh Zoltán"" <[EMAIL PROTECTED]> kirjoitti
viestissä:[EMAIL PROTECTED]
> On
On sze, 2007-01-17 at 15:23 +0200, William Stokes wrote:
> Hello,
>
> I have a script which retrieves rows from DB and prints them to a user
> editable form to a web page. I don't know how to print the form objects so
> that all editable fields are put to arrays for updating them to DB. I have
Hello,
I have a script which retrieves rows from DB and prints them to a user
editable form to a web page. I don't know how to print the form objects so
that all editable fields are put to arrays for updating them to DB. I have
tried to create arrays sarjanID[] etc. but havent got it to work...
10 matches
Mail list logo