Sorry I haven't updated PHPBuilder is
SO long, but I've been a bit busy
helping build a new web site called
SourceForge.
While building the site, I stretched my knowledge of PHP and databases and thought
I would share a few things I learned.
A lot of people ask about passing arrays and using checkboxes/select boxes in PHP,
so that's what I'll cover today.
To pass multiple values, as in a "Multiple Select Box", put [] after the variable name,
like assigned_to[].
Then on the receiving page, you simply do a count() on assigned_to, and iterate
through the list of values that was selected.
| Comments: |
| arrays php and mysql | Peter | 10/30/05 04:26 |
| RE: PHP-mysql in drop-down menu | vanes | 10/13/05 00:24 |
| Arrays/Checkboxes | Geoff | 06/20/05 22:56 |
| T.Shail SOLUTION php array textbox javascript | valian | 05/19/05 07:13 |
| plz help me in php-mysql | Rahul | 03/23/05 01:55 |
| RE: use of php array textbox in javascript | Brock Weaver | 01/17/05 17:51 |
| programming task use php apache | black | 12/29/04 14:06 |
| RE: use of php array textbox in javascript | T.Shailaja | 12/11/04 08:39 |
| RE: How do I create a feedback form? | Mwangi | 12/09/04 02:09 |
| I need to verify checkboxes from a Form | isa | 11/26/04 11:50 |
| Working Code with MySQL + 3 files BEST | iliana | 09/19/04 06:39 |
| RE: ARG!! Help! PHP is not passing form data | global | 08/16/04 12:41 |
| PHP5 Answer to .Net | Ragap Chettri | 07/28/04 00:45 |
| RE: ARG!! Help! PHP is not passing form data | M-IT | 04/23/04 02:02 |
| RE: php4 with Access 2000 | Ragap Chettri | 03/11/04 05:33 |
| RE: accessing variables in an array w/ global off | lpane | 11/21/03 22:18 |
| RE: Post Hash | Mike Marlett | 04/26/03 15:38 |
| RE: ARG!! Help! PHP is not passing form data | Toshesh | 04/22/03 04:15 |
| Post Hash | Stefan | 03/30/03 10:38 |
| RE: i need help about form submit? | mazsolt | 02/05/03 12:27 |
| RE: Passing PHP URL variables no longer work | al matthews | 12/21/02 06:43 |
| RE: How do I make a newssystem??? | f00h | 12/07/02 06:50 |
| RE: Passing PHP URL variables no longer work | f00h | 12/07/02 06:34 |
| i need help about form submit? | devin | 10/24/02 00:34 |
| Passing PHP URL variables no longer work | ASP rox | 10/19/02 16:41 |
| What happenned with this form? | ferdhie | 10/16/02 00:02 |
| RE: ARG!! Help! PHP is not passing form data | Peter Watson | 10/15/02 11:41 |
| For Loop | Bat Boy | 09/18/02 00:10 |
| accessing variables in an array w/ global off | lenn | 09/17/02 21:47 |
| PHP code in Jscript function | Mario Zammit | 09/16/02 21:53 |
| RE: ARG!! Help! PHP is not passing form data | Debby | 09/12/02 22:36 |
| Help with PHP, Form select option text | Ben | 09/11/02 05:58 |
| Arrays from html to mysql via php | random | 09/10/02 11:07 |
| RE: ARG!! Help! PHP is not passing form data | Cam | 09/03/02 00:33 |
| How to execute PHP3 file | Neeraja | 08/29/02 12:18 |
| ARG!! Help! PHP is not passing form data | Rayvin | 08/28/02 17:07 |
| RE: Can .html files use php tags? | Thomas Anderson | 08/27/02 02:45 |
| How do I make a newssystem??? | dennizzz | 08/25/02 14:27 |
| RE: PHP arrays[] and JavaScript | Ron | 08/16/02 14:16 |
| PHP output in drop-down menu | Sanjay | 08/03/02 01:48 |
| PHP output in Form | Sanjay | 08/02/02 09:26 |
| RE: Help! php not communicating with html | PHPslave | 07/30/02 20:36 |
| Arrays,Javascript and PHP | sezgin | 07/11/02 06:57 |
| RE: passing javascript arrays to php | howardc | 07/01/02 14:32 |
| RE: php4 with Access 2000 | charlie page | 06/24/02 16:27 |
| RE: php4 with Access 2000 | no_names | 06/21/02 09:56 |
| How about an Update page... | Rick Heffernan | 06/20/02 16:21 |
| Can .html files use php tags? | John | 06/09/02 21:55 |
| PHP arrays[] and JavaScript | Jonathan Dickmann | 05/29/02 10:51 |
| RE: This multiple select box ain't dynamic | Joongonn | 05/28/02 00:27 |
| Help! php not communicating with html | robin | 05/24/02 21:14 |
| RE: checkboxes in forms with php | Brian | 05/23/02 09:57 |
| RE: This multiple select box ain't dynamic | Mark Arenz | 05/22/02 15:46 |
| RE: checkboxes in forms with php | parkley | 05/21/02 21:26 |
| RE: checkboxes in forms with php | parkley | 05/20/02 22:27 |
| RE: arrays and mysql | Kim Gan | 05/10/02 21:46 |
| RE: arrays and mysql | Kim Gan | 05/10/02 21:45 |
| RE: Possible to declare an array globally? | Albert | 05/08/02 04:17 |
| Pass PHP array to javascript | Mark | 05/01/02 23:06 |
| about session handling with checkboxes in php | amit | 05/01/02 03:58 |
| RE: Using checkboxes in form with PHP | Eric Kaiser | 04/30/02 16:37 |
| Arrays | suchi | 04/17/02 14:39 |
| RE: Arrays, HTML, and PHP | Remco de Jong | 04/11/02 11:21 |
| RE: Arrays, HTML, and PHP | Ramsin | 04/05/02 11:28 |
| RE: Arrays, HTML, and PHP | Lucas Jenkins | 03/26/02 11:49 |
| RE: Arrays, HTML, and PHP | Terry Simpson | 03/22/02 17:36 |
| RE: multiple checkboxes in while loop | cRAsH | 03/02/02 01:17 |
| postgresql inserts, updates, delete with php | funmi | 02/09/02 19:18 |
| RE: This multiple select box ain't dynamic | Bob | 01/17/02 16:24 |
| RE: checkboxes in forms with php | biggus | 01/15/02 11:22 |
| multiple checkboxes in while loop | Mayan | 01/13/02 15:14 |
| checkboxes... | luurich | 01/11/02 10:06 |
| RE: checkboxes in forms with php | bugi | 01/10/02 16:01 |
| Session handling with multiple forms | Mohit | 01/07/02 18:56 |
| checkboxes in forms with php | Christine | 01/03/02 13:38 |
| RE: php4 with Access 2000 | Naios KAE | 11/26/01 05:04 |
| RE: arrays and mysql | hector garzon | 11/19/01 18:01 |
| arrays and mysql | Len | 11/14/01 12:03 |
| menu pop-up and PHP | Sidiney Sodré | 11/13/01 09:05 |
| RE: New in PHP Programming Language | Krishna | 11/07/01 03:45 |
| This multiple select box ain't dynamic | Seibs98 | 11/01/01 10:19 |
| New in PHP Programming Language | Jackie | 10/28/01 21:15 |
| get data from dbase | antonio niz | 10/05/01 04:19 |
| RE: I need to create a feedback form | icyou | 10/04/01 09:38 |
| Possible to declare an array globally? | Toan Pham | 10/03/01 21:51 |
| RE: Postgresql syntax for functions | Al McGrath | 10/01/01 15:27 |
| Variables in HTML with PHP3 | Nacho | 09/24/01 05:48 |
| Postgresql syntax for functions | Grant | 09/20/01 03:35 |
| Using checkboxes in form with PHP | Tran Van Truong | 09/17/01 02:01 |
| which database can be edited in notepad | Parminder singh | 09/12/01 01:20 |
| RE: passing javascript arrays to php | Snigdha | 09/01/01 01:44 |
| RE: easier array handling in PHP4 | musadek, ahmad | 08/29/01 19:28 |
| I need to create a feedback form | designer | 07/10/01 10:19 |
| Update a MySQL db with array contents | Jon | 06/23/01 02:06 |
| RE: Arrays, HTML, and PHP | Bill | 06/05/01 12:22 |
| Dynamic Population Of List Box | Shankar | 05/24/01 10:34 |
| RE: Great stuff but.... | Shankar | 05/23/01 16:16 |
| RE: two dimension arrays | Marijn | 05/22/01 03:33 |
| RE: Arrays, HTML, and PHP | Peter | 05/15/01 16:07 |
| RE: two dimension arrays | john | 05/11/01 09:25 |
| Object's Array | Ana Jose | 05/09/01 06:46 |
| Arrays;;;; | Chris | 04/29/01 07:14 |
| remove duplicates in an array......... | Chiranjeevi Bhavansikar | 04/29/01 07:02 |
| two dimensional arrays in java | Melissa | 04/28/01 19:49 |
| RE: two dimension arrays | philip olson | 04/18/01 20:29 |
| RE: php and form names | philip olson | 04/18/01 20:21 |
| RE: php and form names | Dave | 04/18/01 08:38 |
| pass an array to a page | Anurag | 04/12/01 07:20 |
| easier array handling in PHP4 | Rüdiger Reinhardt | 04/12/01 06:02 |
| php array and javascript | keyur | 04/06/01 06:58 |
| two dimension arrays | David Vilellas | 04/05/01 17:37 |
| Arrays, HTML, and PHP | ciprian | 04/04/01 04:36 |
| passing javascript arrays to php | brian | 03/19/01 02:24 |
| cheers | dan | 03/13/01 12:13 |
| multidimensional arrays | vanessa | 03/07/01 17:14 |
| RE: arrays | philip olson | 02/25/01 11:32 |
| Thanks | Carl Morley | 02/20/01 18:19 |
| LDAP Multidemnsional Array | John D. | 01/17/01 13:52 |
| flat text: search for & display 1 field | Danny Bishop | 01/16/01 15:00 |
| php and form names | Nisha | 12/31/00 09:00 |
| RE: php4 with Access 2000 | Anant | 12/29/00 06:25 |
| arrays | reese | 12/11/00 06:34 |
| RE: php4 with Access 2000 | Beau | 11/29/00 01:14 |
| php4 with Access 2000 | david | 11/21/00 10:44 |
| Great stuff but.... | Dan Champion | 09/11/00 09:52 |
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.
|