Re: [PHP] Re: Checkbox in PHP form

2009-11-10 Thread Adam Randall
On Sun, Nov 8, 2009 at 9:52 PM, Brian Hazelton  wrote:
>  'no') { echo "checked="checked";  } ?> value="PFDs"
> name=f_sequipment1>PFDs
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Adam Randall
http://www.xaren.net
AIM: blitz574

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Checkbox in PHP form

2009-11-08 Thread Brian Hazelton

 value="PFDs"
name=f_sequipment1>PFDs


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Checkbox in PHP form

2009-11-08 Thread Manuel Lemos
Hello,

on 11/08/2009 11:39 PM Ernie Kemp said the following:
> Need some help here with checkboxes in an html form.
> 
>  
> 
> My issue is I have a form that needs to be viewed with checkboxes filled
> in depending on the values in the table.
> 
>  
> 
> I tried:
> 
>  'no') { echo "checked=yes";  } else { echo '';  } ?> value="PFDs"
> name=f_sequipment1>PFDs
> 
> but the checkbox field is always checked.

It should be $row[33] == 'no'

-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Checkbox

2003-03-26 Thread Towel Boy
Try the readonly flag



Haven't tried it, no guarantees...

"Shaun" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> is it possible to have a checkbox that if it is specified to be checked
when
> the page is being formulated then it cannot be unchecked?
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: checkbox question

2002-09-10 Thread Craig Donnelly

This will work:
  http://www.php.net/array_merge

Call your checkboxes like so:

a.php
==
 
 
 
 
 
 
 
 

==

then post it to the desired page and do something like this:

b.php
==
";
 print_r($foo);  // Look whats in the array
 echo "";
?>
==


Best of luck,

Craig




"B.C. Lance" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> if you can't use [] for the checkbox, the only way out is to have unique
> name for each checkbox.
>
> otherwise, php will always be returning the value of the last checked
> checkbox if all checkboxes share the same name without the [].
>
> --lance
>
> Alex Shi wrote:
> > How to ontain data from a group of checkbox using same name?
> > For example, in a form there're 6 checkboxes and all named as
> > "Interesting_Area". I know if put a pairs of square brackets at the
> > end of the name then in php all the values of them can be ontained.
> > However, for some reason I cannot use square brackets. Please
> > help me out if anyone know how to do the trick. THanks!
> >
> > Alex
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: checkbox question

2002-09-10 Thread B.C. Lance

if you can't use [] for the checkbox, the only way out is to have unique 
name for each checkbox.

otherwise, php will always be returning the value of the last checked 
checkbox if all checkboxes share the same name without the [].

--lance

Alex Shi wrote:
> How to ontain data from a group of checkbox using same name?
> For example, in a form there're 6 checkboxes and all named as
> "Interesting_Area". I know if put a pairs of square brackets at the
> end of the name then in php all the values of them can be ontained.
> However, for some reason I cannot use square brackets. Please
> help me out if anyone know how to do the trick. THanks!
> 
> Alex
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: checkbox question

2002-09-09 Thread Craig Donnelly

Why cant you use square brackets??

call all your checkboxes the following:

interesting_area[]

Then post it to whatever page, now all the checkboxes that were checked are
held in a array (interesting_area)

To see what is contained in the array, do the following:

";
print_r($_POST[interesting_area]);
echo "";
?>

>From here it depends on what you want to do with the data..

You can loop through the array, using for(), foreach() or while(), or
alternatively write a function to manipulate the data.

Hope that helps,

Craig

"Alex Shi" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How to ontain data from a group of checkbox using same name?
> For example, in a form there're 6 checkboxes and all named as
> "Interesting_Area". I know if put a pairs of square brackets at the
> end of the name then in php all the values of them can be ontained.
> However, for some reason I cannot use square brackets. Please
> help me out if anyone know how to do the trick. THanks!
>
> Alex
>
>
> --
> ---
> TrafficBuilder Network:
> http://www.bestadv.net/index.cfm?ref=7029
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: checkbox question

2002-09-08 Thread Rodrigo Dominguez

Why you can't use square brackets?
"Alex Shi" <[EMAIL PROTECTED]> escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How to ontain data from a group of checkbox using same name?
> For example, in a form there're 6 checkboxes and all named as
> "Interesting_Area". I know if put a pairs of square brackets at the
> end of the name then in php all the values of them can be ontained.
> However, for some reason I cannot use square brackets. Please
> help me out if anyone know how to do the trick. THanks!
>
> Alex
>
>
> --
> ---
> TrafficBuilder Network:
> http://www.bestadv.net/index.cfm?ref=7029
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php