[FX.php List] list quiet, beginnning to suspect I've been dropped!

Stephen Knight 1-800-353-7950 stephen at fmwebschool.com
Mon Apr 11 12:44:35 MDT 2005


Here is how I just coded it.

I ended up using the eregi() function to compare the values where $state
contains the field contents of more than one state.

<? foreach($listsResult['valueLists']['state']as $key=>$value) {
if(eregi($value,$state)){
$selected='checked';
}else{
$selected='';
}?>
<input type="checkbox" name="state[]" value="<?php echo $value; ?>"<?php
echo $selected; ?>><?php echo $value; ?>
<? } ?>


In Kindness
Stephen K. Knight
www.fmwebschool.com
1-800-353-7950
Professional FileMaker Web Services

----- Original Message ----- 
From: "Vinnie P. Taranto" <vinniept at dso.ufl.edu>
To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
Sent: Monday, April 11, 2005 1:51 PM
Subject: RE: [FX.php List] list quiet, beginnning to suspect I've been
dropped!


Set the variable name as ten[] then use this code:

$addSurvey->AddDBParam('ten', implode("\r", $_POST['ten']));

That will deconstruct the checkbox responses to a string of values and
hard returns will will turn it FileMaker checkboxes

Vinnie Taranto
Technology Specialist & Database Engineer
Dean of Students Office
University of Florida
MAIN: (352) 392-1261
FAX: (352) 392-1261
TDD: (352) 392-5566
TOLLFREE: (877) 9UF-DEAN
WEB: http://www.dso.ufl.edu
EMAIL: vinniept at dso.ufl.edu

-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Jane Chinn
Sent: Monday, April 11, 2005 1:35 PM
To: FX.php Discussion List
Subject: Re: [FX.php List] list quiet, beginnning to suspect I've been
dropped!

Hello,

I am very interested in this solution.  In the FX.php manual on page 42
there is an explanation of form input using checkboxes.  Unfortunately
only one value will show as selected in the database.

Can someone post the correct code for a working example.

Thanks.
Jane

On Apr 11, 2005, at 9:27 AM, Daniel P. Brown wrote:

>> I do have a question though...
>>
>> What is the easiest way to display currently selected values from a
>> check
>> box value list in a case where there are multiple values selected.
>
>
>     Do you mean like a 'for' or 'while' loop?
>
>
> --
> Daniel P. Brown
> Chief Forensic Investigator
> Parasane/ITPD
> ogt at parasane.com [Business Day]
> daniel.brown at parasane.com [Non-Urgent]
> http://www.parasane.com/
> (570-) 604-5518 [mobile]
> (800-) 966-5469 [toll-free in the U.S.]
> _______________________________________________
> 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
_______________________________________________
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