[FX.php List] Problem re-submitting checkboxes to FM7
William Akey
wcakey at hotmail.com
Thu May 11 13:48:22 MDT 2006
Hi Dale,
Thanks for your response. Sorry, I figured that would be understood. When I
said I was submitting $FieldName back to the database, I meant the result of
using:
$FieldName = $_POST['FieldName'];
on the page where I am actually doing the FMEdit().
William
----- Original Message -----
From: "Dale Bengston" <dbengston at preservationstudio.com>
To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
Sent: Thursday, May 11, 2006 12:31 PM
Subject: Re: [FX.php List] Problem re-submitting checkboxes to FM7
> Hi William,
>
> By $FieldName do you actually mean $_POST['FieldName']?
>
> Dale
>
> On May 11, 2006, at 2:26 PM, William Akey wrote:
>
> > A while ago, there was some good discussion about how to properly
> > display a
> > series of checkboxes on a web page. Thanks to those discussions and
> > the use
> > of the explode() and in_array() functions I have been able to get this
> > working correctly.
> >
> > What I cannot get to work correctly is the return of the edited
> > checkbox
> > data to the FM7 database. If I set up the input elements as:
> >
> > <input type="checkbox" name="FieldName[]" value="nine" checked >
> > <input type="checkbox" name="FieldName[]" value="ten" checked >
> >
> > and then use implode("\n", $FieldName) before submitting it back to
> > the
> > database with FMEdit(), I get a PHP bad argument warning for the
> > implode()
> > function and the data in FileName in the database is erased. If I
> > do not use
> > implode() before submitting $FieldName, then FieldName in the
> > database ends
> > up with the word "Array" in it and the other values are gone.
> >
> > If I use FieldName in the input tag, without the "[]", and do not use
> > implode(), then only the last checked value gets submitted to the
> > database
> > and the others are deleted.
> >
> > It seems that using FieldName[] in the input tag and implode("\n",
> > $FieldName) in combination should work, but it doesn't. So, what am
> > I doing
> > wrong and how do I get this to work correctly??
> >
> > Thanks for any help you can offer.
> >
> > William
> > _______________________________________________
> > FX.php_List mailing list
> > FX.php_List at mail.iviking.org
> > http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
More information about the FX.php_List
mailing list