Re: [PHP] Checkbox in PHP form

2009-11-10 Thread Adam Randall
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

[PHP] Checkbox in PHP form

2009-11-08 Thread Ernie Kemp
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 '';

[PHP] checkbox unchecked

2007-12-02 Thread Ronald Wiplinger
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=; }

Re: [PHP] checkbox unchecked

2007-12-02 Thread Stephen
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

Re: [PHP] checkbox unchecked

2007-12-02 Thread Ronald Wiplinger
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:

Re: [PHP] checkbox unchecked

2007-12-02 Thread Larry Garfield
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

Re: [PHP] checkbox unchecked

2007-12-02 Thread Afan Pasalic
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

Re: [PHP] checkbox unchecked

2007-12-02 Thread Steve Edberg
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

Re: [PHP] checkbox unchecked

2007-12-02 Thread Jürgen Wind
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

Re: [PHP] checkbox unchecked

2007-12-02 Thread tedd
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

Re: [PHP] checkbox unchecked

2007-12-02 Thread Casey
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

Re: [PHP] checkbox unchecked

2007-12-02 Thread tedd
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

[PHP] Checkbox Hidden Field to Delete Row

2006-06-01 Thread Rahul S. Johari
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

Re: [PHP] Checkbox Hidden Field to Delete Row

2006-06-01 Thread Ray Hauge
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

Re: [PHP] Checkbox Hidden Field to Delete Row - SOLVED

2006-06-01 Thread Rahul S. Johari
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

Re: [PHP] Checkbox Hidden Field to Delete Row - SOLVED

2006-06-01 Thread Ray Hauge
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

Re: [PHP] Checkbox Hidden Field to Delete Row - SOLVED

2006-06-01 Thread Rahul S. Johari
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

[PHP] checkbox value

2005-03-24 Thread William Stokes
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

Re: [PHP] checkbox value

2005-03-24 Thread Ken
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:

Re: [PHP] checkbox value

2005-03-24 Thread [EMAIL PROTECTED]
# 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

[PHP] checkbox arrays and validation

2004-10-05 Thread Angelo Zanetti
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'] .

RE: [PHP] checkbox arrays and validation

2004-10-05 Thread Ford, Mike
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

Re: [PHP] checkbox arrays and validation

2004-10-05 Thread John Holmes
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

Re: [PHP] checkbox arrays and validation

2004-10-05 Thread Marek Kilimajer
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

Re: [PHP] checkbox arrays and validation

2004-10-05 Thread Angelo Zanetti
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

Re: [PHP] checkbox arrays and validation

2004-10-05 Thread Marek Kilimajer
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]

Re: [PHP] checkbox arrays and validation

2004-10-05 Thread Angelo Zanetti
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

RE: [PHP] checkbox arrays and validation

2004-10-05 Thread Ford, Mike
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

RE: [PHP] checkbox arrays and validation

2004-10-05 Thread Angelo Zanetti
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

[PHP] Checkbox Question

2004-09-02 Thread 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 so, what is it? a=what? Thanks very much! -- Nick W -- PHP General Mailing

Re: [PHP] Checkbox Question

2004-09-02 Thread Stephan Fiedler
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:

Re: [PHP] Checkbox Question

2004-09-02 Thread M. Sokolewicz
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

Re: [PHP] Checkbox Question

2004-09-02 Thread Curt Zirzow
* 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

[PHP] checkbox

2004-06-30 Thread Aris Santillan
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

Re: [PHP] checkbox

2004-06-30 Thread Justin Patrin
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

Re: [PHP] checkbox

2004-06-30 Thread abrea
[] 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

[PHP] checkbox: was it shown or not?

2003-07-17 Thread Chris Hayes (SENSE)
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

Re: [PHP] checkbox: was it shown or not?

2003-07-17 Thread Chris Hayes (SENSE)
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

Re: [PHP] checkbox: was it shown or not?

2003-07-17 Thread Leif K-Brooks
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

Re: [PHP] Checkbox

2003-03-28 Thread SLanger
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

Re: [PHP] Checkbox

2003-03-27 Thread Jason Wong
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

Re: [PHP] Checkbox

2003-03-27 Thread Gudmund Vatn
: 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

[PHP] Checkbox

2003-03-26 Thread shaun
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

Re: [PHP] Checkbox

2003-03-26 Thread Reuben D. Budiardja
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

Re: [PHP] Checkbox

2003-03-26 Thread CPT John W. Holmes
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

Re: [PHP] Checkbox

2003-03-26 Thread Reuben D. Budiardja
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

Re: [PHP] Checkbox

2003-03-26 Thread CPT John W. Holmes
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

Re: [PHP] Checkbox

2003-03-26 Thread Reuben D. Budiardja
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.

Re: [PHP] Checkbox

2003-03-26 Thread Tim Burden
: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

RE: [PHP] Checkbox

2003-03-26 Thread Sysadmin
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

Re: [PHP] Checkbox

2003-03-26 Thread CPT John W. Holmes
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

RE: [PHP] Checkbox

2003-03-26 Thread David Pearson
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

RE: [PHP] Checkbox

2003-03-26 Thread Kalin Mintchev
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

[PHP] Checkbox related...

2003-02-16 Thread Dhaval Desai
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

Re: [PHP] Checkbox related...

2003-02-16 Thread Ernest E Vogelsinger
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:

RE: [PHP] Checkbox related...

2003-02-16 Thread Dhaval Desai
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

RE: [PHP] Checkbox related...

2003-02-16 Thread Ernest E Vogelsinger
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

Re: [PHP] mysql, php, checkbox

2002-12-05 Thread Adrian Partenie
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

Re: [PHP] mysql, php, checkbox

2002-12-03 Thread Adrian Partenie
, 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

[PHP] mysql, php, checkbox

2002-11-28 Thread Adrian Partenie
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

RE: [PHP] mysql, php, checkbox

2002-11-28 Thread John W. Holmes
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

[PHP] checkbox objects returning false for isset() when submitted via a form.

2002-10-01 Thread DonPro
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)

Re: [PHP] checkbox objects returning false for isset() when submittedvia a form.

2002-10-01 Thread Chris Wesley
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

Re: [PHP] checkbox question

2002-09-09 Thread Marek Kilimajer
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

Re: [PHP] checkbox question

2002-09-09 Thread Alex Shi
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

[PHP] checkbox question

2002-09-08 Thread Alex Shi
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

[PHP] Re: PHP checkbox/hidden field question

2002-09-02 Thread Erwin
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

[PHP] RE: PHP checkbox/hidden field question

2002-09-02 Thread Tim Ward
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

Re: [PHP] Re: PHP checkbox/hidden field question

2002-09-02 Thread Marek Kilimajer
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

RE: [PHP] Re: PHP checkbox/hidden field question

2002-09-02 Thread victor
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

Re: [PHP] Re: PHP checkbox/hidden field question

2002-09-02 Thread Erwin
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

[PHP] PHP checkbox/hidden field question

2002-09-01 Thread Paul Maine
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

[PHP] Checkbox question

2002-08-16 Thread José Jeria
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

Re: [PHP] Checkbox question

2002-08-16 Thread Jason Wong
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

Re: [PHP] Checkbox question

2002-08-16 Thread José Jeria
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

Re: [PHP] checkbox = POST = array??

2002-08-12 Thread Brent Baisley
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

[PHP] checkbox = POST = array??

2002-08-10 Thread PeterV
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

Re: [PHP] checkbox = POST = array??

2002-08-10 Thread Jason Stechschulte
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]

[PHP] Checkbox Initial Value based on record in db

2002-05-01 Thread Daniel Negron/KBE
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 !!

Re: [PHP] Checkbox Initial Value based on record in db

2002-05-01 Thread Miguel Cruz
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

Re: [PHP] Checkbox Initial Value based on record in db

2002-05-01 Thread 1LT John W. Holmes
: [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

RE: [PHP] Checkbox Initial Value based on record in db

2002-05-01 Thread Craig Vincent
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

[PHP] checkbox doesn't pass?

2002-04-04 Thread savaidis
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

Re: [PHP] checkbox doesn't pass?

2002-04-04 Thread heinisch
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

Re: [PHP] checkbox doesn't pass?

2002-04-04 Thread Jason Wong
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

RE: [PHP] checkbox doesn't pass?

2002-04-04 Thread savaidis
: 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

RE: [PHP] checkbox doesn't pass?

2002-04-04 Thread Eugene Mah
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. -- -

RE: [PHP] checkbox doesn't pass?

2002-04-04 Thread Matt Schroebel
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

Re: [PHP] checkbox doesn't pass?

2002-04-04 Thread Chris Boget
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:

Re: [PHP] checkbox doesn't pass?

2002-04-04 Thread Philip Olson
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:

Re: [PHP] checkbox validation

2001-04-24 Thread Keyur Kalaria
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

[PHP] checkbox validation

2001-04-18 Thread Jacky
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

RE: [PHP] checkbox validation

2001-04-18 Thread Matt Williams
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

Re: [PHP] checkbox validation

2001-04-18 Thread Robert Vetter
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: