INPUT class=text id=myCheck1 type=checkbox?php echo( $row[33] ==
'no' ? ' checked=checked' : '' ); ? value=PFDs
name=f_sequipment1/bfont size=2PFDsb
Or with short tags:
INPUT class=text id=myCheck1 type=checkbox?= $row[33] == 'no' ? '
checked=checked' : '' ? value=PFDs name=f_sequipment1/bfont
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:
INPUT class=text id=myCheck1 type=checkbox ?php if ( $row[33] = 'no') {
echo checked=yes; } else { echo '';
I have now tried to add many of the security hints on a web page and
come to a problem.
I am checking if the allowed fields match the sent fields.
From the database I get the information if a checkbox is checked or not:
?php if($DB_a ==y) {
$checked=checked;
} else {
$checked=;
}
Ronald Wiplinger wrote:
How can I force a n for not checked in the input field? or how can I
solve that?
Either use radio buttons or a drop down for the input field.
Stephen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Stephen wrote:
Ronald Wiplinger wrote:
How can I force a n for not checked in the input field? or how can I
solve that?
Either use radio buttons or a drop down for the input field.
Thanks!
Stephen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
First of all, using y and n for boolean values (such as a checkbox) is
very sloppy. n is boolean True. A boolean value should evaluate correctly
in a boolean context. For that, you should use 1 and 0 for your values.
What I usually do is this:
input type=hidden name=foo value=0 /
input
I did once, if I remember once, this strategy:
input type=hidden name=R_a value=n
input type=checkbox name=R_a value=y ?php echo $checked ?
If checked, you will have value y. Though, if unchecked, or it was
checked and visitor unchecked, the value should be n.
;)
-afan
Ronald Wiplinger
Just to add my two cents -
I don't think it matters much what tokens you use to represent true
or false, since you're going to be explicitly checking them on the
server end anyway. I can't see much difference in principle between,
for example:
if ($_GET['foo'] == 'y')...
and
nice!
but to avoid confusion it should read (assuming that $checked is a boolean
variable):
input type=hidden name=foo value=0/
input type=checkbox name=foo value=1?php if($checked) echo '
checked'; ?/
IMHO
Larry Garfield wrote:
First of all, using y and n for boolean values (such as a
At 12:36 PM -0600 12/2/07, Larry Garfield wrote:
First of all, using y and n for boolean values (such as a checkbox) is
very sloppy. n is boolean True. A boolean value should evaluate correctly
in a boolean context. For that, you should use 1 and 0 for your values.
What I usually do is
On Dec 2, 2007 1:08 PM, tedd [EMAIL PROTECTED] wrote:
At 12:36 PM -0600 12/2/07, Larry Garfield wrote:
First of all, using y and n for boolean values (such as a checkbox) is
very sloppy. n is boolean True. A boolean value should evaluate correctly
in a boolean context. For that, you should
At 1:23 PM -0800 12/2/07, Casey wrote:
On Dec 2, 2007 1:08 PM, tedd [EMAIL PROTECTED] wrote:
You don't need to do anything.
input type=checkbox name=likes_pie /
When it's submitted:
?php
if ($_GET['likes_pie']) // checked
else // not
That's true unless you're pulling data in from somewhere
Ave,
I¹m stuck on a problem here.
I have a file manager kind of application and I¹m trying to add the
functionality to delete multiple files.
Basically, there¹s a bunch of rows generated dynamically. Each row has a
checkbox for ³Delete² option, and a hidden field which contains the name of
the
On Thursday 01 June 2006 12:58, Rahul S. Johari wrote:
Ave,
I¹m stuck on a problem here.
I have a file manager kind of application and I¹m trying to add the
functionality to delete multiple files.
Basically, there¹s a bunch of rows generated dynamically. Each row has a
checkbox for
Ave,
I spent 3 hours trying to find or develop a solution for this problem... And
believe it or not, within 3 minutes of sending the problem to the mailing
list, I actually generated a solution!! Ray, you’re spot on with what’s
actually happening, but this is what I did to resolve it...
Here’s
On Thursday 01 June 2006 13:15, Rahul S. Johari wrote:
Ave,
I spent 3 hours trying to find or develop a solution for this problem...
And believe it or not, within 3 minutes of sending the problem to the
mailing list, I actually generated a solution!! Ray, you’re spot on with
what’s actually
Ray,
Interestingly, I don't' allow special characters in File Names for files
being uploaded to the File Manager. So that problem won't occur.
Thanks.
On 6/1/06 4:23 PM, Ray Hauge [EMAIL PROTECTED] wrote:
On Thursday 01 June 2006 13:15, Rahul S. Johari wrote:
Tad different, but that will
Hello,
I have a checkbox in a form. How can I determine if the user has set the
checkbox on or not?
Thanks
-Will
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
isset($_POST['checkboxname']) or isset($_GET['checkboxname'])
depending on the method of your form.
a good thing to do is to do var_dump($_POST) or var_dump($_GET) to see
all the values posted from the form...
hth
ken
On Thu, 24 Mar 2005 15:42:10 +0200, William Stokes [EMAIL PROTECTED] wrote:
# index.php
form method=post action=index.php
?php
$checked = ($_POST['CheckThis'] == 'Yes') ? 'checked' : '' ;
input type=checkbox name=CheckThis value=Yes ?= $checked ?
input type=Submit value=Submit
/form
-afan
William Stokes wrote:
Hello,
I have a checkbox in a form. How can I determine if
Hi all,
this might be slightly off-topic in a way but Im looking for help not
flaming.
Ok I have a checkbox array that I populate from a DB using php:
while ($row = mysql_fetch_array($result))
echo(input type=checkbox name=chkmodels[] value= .
$row['models_id'] . . $row['models_type'] .
On 05 October 2004 11:10, Angelo Zanetti wrote:
Hi all,
this might be slightly off-topic in a way but Im looking for help not
flaming.
Ok I have a checkbox array that I populate from a DB using php:
while ($row = mysql_fetch_array($result))
echo(input type=checkbox
Angelo Zanetti wrote:
but what I want to clarify is that if I change my PHP echo statement
to:
echo(input type=checkbox name=chkmodels value= . $row['models_id'] .
. $row['models_type'] . br);
basically without the [] then it is still recognised as an array. But
when the array is passed back it
Angelo Zanetti wrote:
Here is the OT part. how do I reference the checkboxes in javascript if
the chkmodels[] is used?
I have tried many things like:
myCheckboxArray = document.forms[0].elements[chkmodels[]];
The above should work. Is it really the first form on the page?
--
PHP General Mailing
its the only form on the page...
Based on the other responses I will have to use chkmodels[] and need to
get the javascript working. Is it not possible to use the forms name
when referencing the array?
thank again.
Angelo
Marek Kilimajer [EMAIL PROTECTED] 10/5/2004 1:52:02 PM
Angelo Zanetti
Angelo Zanetti wrote:
its the only form on the page...
Based on the other responses I will have to use chkmodels[] and need to
get the javascript working. Is it not possible to use the forms name
when referencing the array?
You should be able to use:
document.formName
document.forms[0]
Hi Marek,
I try to access the array like this:
document.frmft.elements[chkmodels[]];
but doesnt work. I also tried this:
models = document.forms['frmft'].elements[chkmodels[]];
is there not a problem with the elements part?
thanks
Marek Kilimajer [EMAIL PROTECTED] 10/5/2004 2:19:26 PM
On 05 October 2004 13:55, Angelo Zanetti wrote:
Hi Marek,
I try to access the array like this:
document.frmft.elements[chkmodels[]];
but doesnt work. I also tried this:
models = document.forms['frmft'].elements[chkmodels[]];
is there not a problem with the elements part?
So long
thanks Mike,
worked like a charm!!
and thanks to the others who replied!
Ford, Mike [EMAIL PROTECTED] 10/5/2004 3:09:32 PM
On 05 October 2004 13:55, Angelo Zanetti wrote:
Hi Marek,
I try to access the array like this:
document.frmft.elements[chkmodels[]];
but doesnt work. I
Hi all,
Im using php's cURL module to submit a form on a remote site. All is
*good* so far but i dont know what parameter to pass to ensure that
this checkbox is 'checked':
INPUT TYPE=checkbox NAME=a VALUE=on
so, what is it? a=what?
Thanks very much!
--
Nick W
--
PHP General Mailing
Hi Nick,
Nick Wilson wrote:
Hi all,
[...]
INPUT TYPE=checkbox NAME=a VALUE=on
so, what is it? a=what?
[...]
if a was checked a=on is posted (or 'get'ed)
if not checked a isn't set.
Thanks very much!
You're welcome
Stephan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Stephan Fiedler wrote:
Hi Nick,
Nick Wilson wrote:
Hi all, [...]
INPUT TYPE=checkbox NAME=a VALUE=on
so, what is it? a=what?
[...]
if a was checked a=on is posted (or 'get'ed)
if not checked a isn't set.
Thanks very much!
You're welcome
Stephan
that actually depends on the browser. Mayne
* Thus wrote Nick Wilson:
Hi all,
Im using php's cURL module to submit a form on a remote site. All is
*good* so far but i dont know what parameter to pass to ensure that
this checkbox is 'checked':
INPUT TYPE=checkbox NAME=a VALUE=on
TIAS.
a=value|on)
which ever the browser seems
how can process only items with checked check-box?
--- html ---
html
head
titleUntitled Document/title
/head
body
form name=form1 method=post action=
p
input type=checkbox name=checkbox value=checkbox
input type=text name=textfield[1]
/p
p
input
Try foreach ($_POST['textfield'] as $num = $value);
On Wed, 30 Jun 2004 15:56:35 +0800, Aris Santillan
[EMAIL PROTECTED] wrote:
how can process only items with checked check-box?
--- html ---
html
head
titleUntitled Document/title
/head
body
form
[] value=value3
Regards
Alberto Brea
[EMAIL PROTECTED]
-Original Message-
From: Aris Santillan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Wed, 30 Jun 2004 15:56:35 +0800
Subject: [PHP] checkbox
how can process only items with checked check-box?
--- html
hi,
if i understand well, a checkbox in a form is only send on to the next page
when it is checked: so the next page will only see a value in
$_POST['checkboxname'] if it is set: else it is not set. Right?
So the followup page cannot see the difference between a form where the
checkbox was not
AM
Subject: [PHP] checkbox: was it shown or not?
hi,
if i understand well, a checkbox in a form is only send on to the next
page
when it is checked: so the next page will only see a value in
$_POST['checkboxname'] if it is set: else it is not set. Right?
So the followup page cannot see
Chris Hayes (SENSE) wrote:
if i understand well, a checkbox in a form is only send on to the next
page when it is checked: so the next page will only see a value in
$_POST['checkboxname'] if it is set: else it is not set. Right?
So the followup page cannot see the difference between a form
Hello
From a usability standpoint showing a checkbox that cannot be unchecked
renders the checkbox obsolete. The consquence is not to show a checkbox at
all. If you need an uncheckable checkbox because of licence aggreements or
something like that. Or privacydeclaration type checkbox. Make it
On Thursday 27 March 2003 03:26, Reuben D. Budiardja wrote:
But isn't it so much easier to type in that one line HTML + javascript than
trying to get an image of a checked check box.. unless you have that
handy, you'd have to eg. take a snapshot, or draw something, then save the
file as
: Wednesday, March 26, 2003 2:26 PM
Subject: Re: [PHP] Checkbox
On Wednesday 26 March 2003 02:11 pm, CPT John W. Holmes wrote:
On Wednesday 26 March 2003 01:43 pm, CPT John W. Holmes wrote:
is it possible to have a checkbox that if it is specified to be
checked
when the page is being
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
On Wednesday 26 March 2003 09:16 am, shaun wrote:
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?
When you write the page, if the checkbox is checked initially, write also a
javascript to prevent it
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?
No. No... No.
If you already know you don't want it to be unchecked, then don't show a
checkbox. That's why we have PHP, so you can create your page
On Wednesday 26 March 2003 01:43 pm, CPT John W. Holmes wrote:
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?
No. No... No.
If you already know you don't want it to be unchecked, then don't show a
On Wednesday 26 March 2003 01:43 pm, CPT John W. Holmes wrote:
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?
No. No... No.
If you already know you don't want it to be unchecked, then don't show a
On Wednesday 26 March 2003 02:11 pm, CPT John W. Holmes wrote:
On Wednesday 26 March 2003 01:43 pm, CPT John W. Holmes wrote:
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?
No. No... No.
:26 PM
Subject: Re: [PHP] Checkbox
On Wednesday 26 March 2003 02:11 pm, CPT John W. Holmes wrote:
On Wednesday 26 March 2003 01:43 pm, CPT John W. Holmes wrote:
is it possible to have a checkbox that if it is specified to be
checked
when the page is being formulated then it cannot
I agree...and like John said, as long as you don't accept any changes
when you process the form you should be good to go...
-Original Message-
From: Tim Burden [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 2:25 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Checkbox
Just using
But isn't it so much easier to type in that one line HTML + javascript
than
trying to get an image of a checked check box.. unless you have that
handy, you'd have to eg. take a snapshot, or draw something, then save the
file as an image file...hmm...
and as you said, the effect will
and unchecking the box. Only the DISABLED flag does. Readonly
apparently prevents the user from altering the value of the input field.
-Original Message-
From: Tim Burden [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 11:25 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Checkbox
Just
hello,
how can i get the output file from the curl function to stream - to be
processed like from fopen or fsockopen?
thanks...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi everybody,
I have a form with 5 checkboxes. I want to make sure that a user checks
atleast 2 boxes before he can proceed. How can that be made possible.
Thank you
-Dhaval
_
The new MSN 8: smart spam protection and 2 months
At 19:57 16.02.2003, Dhaval Desai said:
[snip]
I have a form with 5 checkboxes. I want to make sure that a user checks
atleast 2 boxes before he can proceed. How can that be made possible.
[snip]
You have 2 options:
How do we do it using the first option i.e javascript to count how many
boxes are checked...could you give some example...
Thanx
-Dhaval
From: David McInnis [EMAIL PROTECTED]
To: 'Dhaval Desai' [EMAIL PROTECTED]
Subject: RE: [PHP] Checkbox related...
Date: Sun, 16 Feb 2003 10:59:17 -0800
At 20:34 16.02.2003, Dhaval Desai said:
[snip]
How do we do it using the first option i.e javascript to count how many
boxes are checked...could you give some example...
[snip]
Warning - untested:
script
Indeed, now it works, I put the form tag by mistake...
Thanks,
Adrian
- Original Message -
From: rija [EMAIL PROTECTED]
To: Adrian Partenie [EMAIL PROTECTED]
Sent: Tuesday, December 03, 2002 11:30 PM
Subject: Re: [PHP] mysql, php, checkbox
There are form/form tags around input type
, November 28, 2002 5:54 PM
Subject: RE: [PHP] mysql, php, checkbox
I'm displaying the content of a mysql table with autoincrement index.
I
want to be able to select the each row from the table using the check
boxes. In order to do that, i want to assign to each checkbox the
name=index
Hello,
I'm displaying the content of a mysql table with autoincrement index. I want to be
able to select the each row from the table using the check boxes. In order to do that,
i want to assign to each checkbox the name=index of selected row.
I assign to the checkboxes the value of selected
I'm displaying the content of a mysql table with autoincrement index.
I
want to be able to select the each row from the table using the check
boxes. In order to do that, i want to assign to each checkbox the
name=index of selected row.
I assign to the checkboxes the value of selected id, but
Hi,
I have a form that submits to itself via:
form name=hsform method=POST action=?=$_SERVER['PHP_SELF'] ?
Within my form, I have some checkbox objects. If I check them and submit my
form, isset(variable) returns true. However, if I do not check them and
submit my form, isset(variable)
On Tue, 1 Oct 2002, DonPro wrote:
Within my form, I have some checkbox objects. If I check them and submit my
form, isset(variable) returns true. However, if I do not check them and
submit my form, isset(variable) returns false.
I am confused as I though that isset() returns true if the
If you cannot use square brackets, get the values yourself from
$_SERVER['QUERY_STRING']
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
Thanks for your reply!
I tested $_SERVER['QUERY_STRING']. Seems like it only return the
string for get method but not for post. Any idea?
Alex
Marek Kilimajer [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
If you cannot use square brackets, get the values
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
I am executing the follwoing statement as part of a while loop.
This is part of a form and I wish to pass the name and value of the
checkbox as a hidden field only is the checkbox is checked. Can you
suggest how I can accomplish this task?
tdinput type=checkbox name=d_c_arr[] value=?php
PROTECTED]]
Sent: 02 September 2002 00:56
To: PHP PHP
Subject: PHP checkbox/hidden field question
I am executing the follwoing statement as part of a while
loop. This is
part of a form and I wish to pass the name and value of the
checkbox as a
hidden field only is the checkbox is checked
You are wrong, this is from HTML 4.01 specification:
value = /cdata/ cid:[EMAIL PROTECTED] [CA]
cid:[EMAIL PROTECTED]
This attribute specifies the initial value cid:[EMAIL PROTECTED] of
the control. It is optional except when the
type cid:[EMAIL PROTECTED] attribute has the value radio or
Some check box info here too:
http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_20117420.html
- Victor www.argilent.com
-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 02, 2002 7:24 AM
To: PHP
Subject: Re: [PHP] Re: PHP checkbox
Marek Kilimajer wrote:
You are wrong, this is from HTML 4.01 specification:
You're right. Thanks for your reply!
Grtz Erwin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am executing the follwoing statement as part of a while loop. This is
part of a form and I wish to pass the name and value of the checkbox as a
hidden field only is the checkbox is checked. Can you suggest how I can
accomplish this task?
tdinput type=checkbox name=d_c_arr[] value=?php echo
I have a page with a checkbox, when i submit to the next page the
variable $whatever (the checkboxes name.) will be On if its checked,
and it will be undefined if its not checked.
Shouldn't it be a empty string? and not undefined?
/José
--
PHP General Mailing List (http://www.php.net/)
To
On Friday 16 August 2002 17:54, José Jeria wrote:
I have a page with a checkbox, when i submit to the next page the
variable $whatever (the checkboxes name.) will be On if its checked,
and it will be undefined if its not checked.
Shouldn't it be a empty string? and not undefined?
That is
Hmmm, then the book Beginning PHP from Wrox is wrong...
/J
Jason Wong wrote:
On Friday 16 August 2002 17:54, José Jeria wrote:
I have a page with a checkbox, when i submit to the next page the
variable $whatever (the checkboxes name.) will be On if its checked,
and it will be undefined if
I'm doing something very similar on a project I'm working on, except I'm
using radio buttons. I'm not quite sure what are using the ID for (for
style sheets or a data ID). If you are using it as a data ID, then you
can make it part of the topic[] array. So it would look like this:
input
I,
I don't have my books here and it's been a while since I did PHP, and
google isn't helping:
How do I code a bunch of checkboxes with id's, and then loop trough the
result as an array after POSTing it?
What I have now:
input type='checkbox' id='45' name='topic[]' value='45'
doesn't return an
On Sat, Aug 10, 2002 at 02:56:48PM -0400, PeterV wrote:
What I have now:
input type='checkbox' id='45' name='topic[]' value='45'
doesn't return an array $topic??
Probaby due to register_globals. It should exist in $_POST['topic']
--
Jason Stechschulte
[EMAIL PROTECTED]
Kinda off topic here, just checking to see If I am on the right track with
this
input type=checkbox name=abb value=?php echo $myrow['abb'] ?
the result should be :
IF the record contains the field abb and it has a value of 1 then it will
be checked off for viewing.
Brainfarting all day !!
On Wed, 1 May 2002, Daniel Negron/KBE wrote:
Kinda off topic here, just checking to see If I am on the right track with
this
input type=checkbox name=abb value=?php echo $myrow['abb'] ?
the result should be :
IF the record contains the field abb and it has a value of 1 then it will
be
: [PHP] Checkbox Initial Value based on record in db
Kinda off topic here, just checking to see If I am on the right track with
this
input type=checkbox name=abb value=?php echo $myrow['abb'] ?
the result should be :
IF the record contains the field abb and it has a value of 1
Kinda off topic here, just checking to see If I am on the right track with
this
input type=checkbox name=abb value=?php echo $myrow['abb'] ?
the result should be :
IF the record contains the field abb and it has a value of 1
then it will
be checked off for viewing.
No, that wouldn't
I have a html form with some text (T1) and checkbox (C1) fields to pass
it to a php script.
Accessing text fields has no problem.
There is a problem when I use
$C1=$HTTP_POST_VARS['C1']
to take the value of C1 (ON)
If it is not checked, then it is not set at all. (??why??)
So I use :
if
At 04.04.2002 15:23, you wrote:
I have a html form with some text (T1) and checkbox (C1) fields to pass
it to a php script.
Accessing text fields has no problem.
There is a problem when I use
$C1=$HTTP_POST_VARS['C1']
to take the value of C1 (ON)
If it is not checked, then it is not set at
On Thursday 04 April 2002 20:46, [EMAIL PROTECTED] wrote:
why do you use $HTTP_POST_VARS? Do I miss something?
For security reasons.
Manual Security
--
Jason Wong - Gremlins Associates - www.gremlins.com.hk
/*
Above all things, reverence yourself.
*/
--
PHP General Mailing List
: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 5:51 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] checkbox doesn't pass?
On Thursday 04 April 2002 20:46, [EMAIL PROTECTED] wrote:
why do you use $HTTP_POST_VARS? Do I miss something?
For security reasons.
Manual
At 18:17 04-04-02 +0300, savaidis wrote:
But IF I still want to use $HTTP_POST_VARS, what then? What about the
warning when checkbox is not checked?
I use empty() to check the for the existence of checkbox variables.
--
-
You should use $HTTP_POST_VARS (or $_POST) all of the time. There's security risks in
using register_globals. It's not risky in all cases. But register_globals will allow
arbitrary variables to be added to into the name space of your script by simply
putting them on the uri. Code not
But IF I still want to use $HTTP_POST_VARS, what then? What about the
warning when checkbox is not checked?
I use empty() to check the for the existence of checkbox variables.
You can also use isset();
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Unchecked checkboxes pass no values, that's how
it works. It's either set or not. Default value
for a checkbox is 'on' although you can change
that. isset() will work fine.
Regards,
Philip
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
for the poor explanation but i hope this will serve your purpose. if
you have any queries with this feel free to contact me.
regards
keyur
$$$
- Original Message -
From: Jacky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 19, 2001 1:13 AM
Subject: [PHP] checkbox
Hi all
I have a form with the checkbox like this
form
$query="select id from foo";
$result=($query,$con);
while ($row = mysql_fetch_array($result))
{
input type="checkbox" name="$id" value="on"
}
submit button and stuffs here...
/form
After I submit to next page, at next page, how
After I submit to next page, at next page, how do I check which
check box is checked?
like this?
if ($id=="on") {
do something
}else{
do something
}
Hi
try this assuming you have no toher check boxes called $id
if(isset($id))
{
do something
}else{
do other
}
M@
--
PHP
Jacky wrote:
Hi all
I have a form with the checkbox like this
form
$query="select id from foo";
$result=($query,$con);
while ($row = mysql_fetch_array($result))
{
input type="checkbox" name="$id" value="on"
}
submit button and stuffs here...
/form
One possibility:
94 matches
Mail list logo