RE: [PHP] retrieving form checkbox values
| From: | Sævar Öfjörð | Date: | Thu, 17 Jul 2003 09:34:52 +0000 |
| Subject: | RE: [PHP] retrieving form checkbox values | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155573@lists.php.net to get a copy of this message | ||
I think you have to do <input type=checkbox name=File[]>
Then $File becomes an array. If you want to retrieve the value for each
checkbox you can use a for loop and do value=$File[$i]
-----Original Message-----
From: Jason Wong [mailto:php-general@gremlins.biz]
Sent: 17. júlí 2003 08:58
To: php-general@lists.php.net
Subject: Re: [PHP] retrieving form checkbox values
On Thursday 17 July 2003 16:45, caspar kennerdale wrote:
> I have a form which I want to post multiple values from one function
to
> another using checkboxes.
>
> Having one value is simple- the form submits the value $File and is
then
> retrieved in the target function via $_Request['File'] So far so good.
>
> Now I want to have multiple values for $File, because $File is a value
> assigned to a dynamically generated list of files in a folder (which
will
> change from folder to folder).
>
> If I have multiple <input type=checkbox name=File value=$File> then
only
> the last value is posted to the next function and retrieved by
> $_Request['File']
>
> How can I post and retrieve all values of $File or am I going about
this
> the wrong way?
manual > PHP and HTML
Or search the archives and/or ask google.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
My doctor told me to stop having intimate dinners for four. Unless
there
are three other people.
-- Orson Welles
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php