X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9BD53D1B33B for ; Wed, 2 Jun 2004 21:57:16 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 16209-06 for ; Thu, 3 Jun 2004 00:57:19 +0000 (GMT) Received: from dnscache2.syd.nexon.com.au (dnscache2.syd.nexon.com.au [210.215.48.100]) by svr1.postgresql.org (Postfix) with ESMTP id 21C05D1B298 for ; Wed, 2 Jun 2004 21:57:14 -0300 (ADT) Received: from chris ([210.215.130.98]) by dnscache2.syd.nexon.com.au (8.12.8p1/8.12.8) with ESMTP id i5311JMj017006; Thu, 3 Jun 2004 11:01:20 +1000 (EST) (envelope-from chris@interspire.com) From: "Chris" To: "'Lynna Landstreet'" , Subject: Re: Question about checkboxes in forms Date: Thu, 3 Jun 2004 10:56:54 +1000 Message-ID: <000001c44905$aafb0c20$0d00a8c0@chris> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200406/7 X-Sequence-Number: 2781 Hi Lynna, Try this instead Then when you get $_POST, it'll be an array.... That should fix it up =) Regards, Chris Smith Suite 30, 45-51 Huntley St, Alexandria, NSW 2015 Australia Ph: +61 2 9517 2505 Fx: +61 2 9517 1915 email: info@interspire.com web: www.interspire.com -----Original Message----- From: pgsql-php-owner@postgresql.org [mailto:pgsql-php-owner@postgresql.org] On Behalf Of Lynna Landstreet Sent: Thursday, June 03, 2004 10:44 AM To: pgsql-php@postgresql.org Subject: [PHP] Question about checkboxes in forms Hi folks, I'm running into a bit of trouble processing a form I set up. When I extract the information from $_POST after submitting the form, everything comes through fine except for the one form field that uses checkboxes - only the last value checked comes through in that one. In my past experience, when using checkboxes in formmail scripts and the like, what comes through is a list of the values checked, separated by commas. Does it still work that way when capturing the form data with PHP? If so, could the commas be throwing it off? I was expecting the contents of $_POST[keywords] to be a string of keyword IDs separate by commas, which I could then explode into an array, but instead I only get the last value checked, as though each box checked replaced the previous one. The keyword checkboxes are generated from the database, but from looking at the source on the resulting web page the HTML seems to be fine. Each checkbox looks something like this: They all have the name "keywords", but that's the norm for checkboxes and radio buttons, isn't it? Usually it just groups all the values for each named group of checkboxes into one string, but not this time, apparently. Any ideas? Lynna -- Resource Centre Database Coordinator Gallery 44 www.gallery44.org ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster