[FX.php List] Problem re-submitting checkboxes to FM7

DC dan.cynosure at dbmscan.com
Thu May 11 13:31:34 MDT 2006


why don't you print_r($FieldName); and look at the results - what is there?

is it possible there is a nested array?

dan

William Akey had written:
> 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
> 


More information about the FX.php_List mailing list