[PHP-DB] checkboxes

2005-01-21 Thread Craig Hoffman
I have a form that display's a checkbox if the value is NULL. The form is in a do... while loop, so the user may check multiple checkboxes. I am trying to pass the variable of each checkboxes to an update statement in MySQL. THe problem is I am only getting one of the checkboxes, even if all

RE: [PHP-DB] checkboxes

2005-01-21 Thread Hutchins, Richard
, 2005 4:03 PM To: php-db@lists.php.net Subject: [PHP-DB] checkboxes I have a form that display's a checkbox if the value is NULL. The form is in a do... while loop, so the user may check multiple checkboxes. I am trying to pass the variable of each checkboxes to an update statement in MySQL

Re: [PHP-DB] checkboxes

2005-01-21 Thread Craig Hoffman
=completed[] Then you can access the array on your update page and do whatever you wish with it. Hope this helps. Rich -Original Message- From: Craig Hoffman [mailto:[EMAIL PROTECTED] Sent: Friday, January 21, 2005 4:03 PM To: php-db@lists.php.net Subject: [PHP-DB] checkboxes I have a form

RE: [PHP-DB] checkboxes

2005-01-21 Thread Hutchins, Richard
will correct me there if my memory has failed me. -Original Message- From: Craig Hoffman [mailto:[EMAIL PROTECTED] Sent: Friday, January 21, 2005 4:32 PM To: php-db@lists.php.net Cc: Richard Hutchins Subject: Re: [PHP-DB] checkboxes I've tried that and it still doesn't bring over the other

Re: [PHP-DB] checkboxes

2005-01-21 Thread Craig Hoffman
: [PHP-DB] checkboxes I've tried that and it still doesn't bring over the other checkboxes that have been checked. Plus when I echo it out I get Array instead of the variable name. On Jan 21, 2005, at 3:14 PM, Hutchins, Richard wrote: Probably all you need to do is name your checkboxes as an array

Re: [PHP-DB] Checkboxes on repeat regions

2004-12-06 Thread Stuart Felenstein
--- Jason Wong [EMAIL PROTECTED] wrote: I'm not sure what you mean exactly by intended use checkboxes. Intended use - I generate a list (via a repeat region) of records. Each item on the list has an associated checkbox. If I put a check in the box, do a $_POST I expect on the next page

Re: [PHP-DB] Checkboxes on repeat regions

2004-12-06 Thread Jason Wong
On Monday 06 December 2004 20:39, Stuart Felenstein wrote: --- Jason Wong [EMAIL PROTECTED] wrote: I'm not sure what you mean exactly by intended use checkboxes. Intended use - I generate a list (via a repeat region) of records. Each item on the list has an associated checkbox. If I put

[PHP-DB] Checkboxes in a table

2004-08-20 Thread 'Miguel Guirao'
Hi!! I'm dinamically building a table, within a while cycle a build each row with it's columns. One of these columns contains a checkbox, so I have as many checkboxes as many rows. So, after hitting Submit I wanna know which checkboxes has been selected, I'm naming each of them like this:

SV: [PHP-DB] checkboxes and loops

2004-03-29 Thread Henrik Hornemann
Hi, Try: $counter = 1; while (whatever) { $varname = 'box'.$counter; if ($$varname == 'delete') do whatever $counter++; } Hth Henrik Hornemann -Oprindelig meddelelse- Fra: matthew perry [mailto:[EMAIL PROTECTED] Sendt: 29. marts 2004 07:45 Til: [EMAIL PROTECTED] Emne: [PHP-DB

RE: [PHP-DB] checkboxes and loops

2004-03-29 Thread Duane Lakoduk
PM To: [EMAIL PROTECTED] Subject: [PHP-DB] checkboxes and loops OK lets see if I can figure out how to ask this: I am setting up a system for my company to filter through employee applications. Most of the applications do not fit the criteria and I want to allow my bosses a checkbox

Re: [PHP-DB] checkboxes and loops

2004-03-29 Thread John W. Holmes
matthew perry wrote: input type = checkbox name = box?echo $counter;? value = delete $counter++; *Bad solution 2 (doesn't work)*** $counter = 1; while (whatever) { if ($box . $counter == 'delete') do whatever $counter++; } *** if(${$box .

[PHP-DB] checkboxes and loops

2004-03-28 Thread matthew perry
OK lets see if I can figure out how to ask this: I am setting up a system for my company to filter through employee applications. Most of the applications do not fit the criteria and I want to allow my bosses a checkbox to the right of them which they can check or uncheck to remove an

Re: [PHP-DB] checkboxes and loops

2004-03-28 Thread Mikhail U. Petrov
Hi! I think you should rename checkboxes to box[1], box[2] etc. So you will get an array $_POST[box]. I think it will be better. Best wishes, Mikhail U. Petrov, PHP-programmer Hello matthew, Monday, March 29, 2004, 9:45:28 AM, you wrote: mp OK lets see if I can figure out how to ask this: mp

[PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread Lewis Watson
I have a mysql database with a table using one column as a primary key. (rowID). On a php page I use a query to list all of the rows of the table and have a checkbox beside each row that should be used to check if you would like to delete this row. Can someone give me an example using post to

Re: [PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread 1LT John W. Holmes
I have a mysql database with a table using one column as a primary key. (rowID). On a php page I use a query to list all of the rows of the table and have a checkbox beside each row that should be used to check if you would like to delete this row. Can someone give me an example using post

Re: [PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread Mathieu Dumoulin
It is wrong to use that way of doing it John, cause this will delete ALL lines that where printed with a checkbox And also, if you are using a old version of PHP with register globals OFF, the _POST array will not be available Mathieu Dumoulin 1lt John W. Holmes [EMAIL PROTECTED] a écrit dans le

RE: [PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread George Pitcher
records, this makes sesne. Just my 2c. George in Oxford -Original Message- From: Mathieu Dumoulin [mailto:[EMAIL PROTECTED] Sent: 24 February 2003 3:49 pm To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Checkboxes to gather rows to delete It is wrong to use that way of doing it John

Re: [PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread Lewis Watson
I appreciate all of the quick replies. I do have globals off. Currently, I have the values for each ID being returned in a array Array ( [0] = 101 [1] = 201 ) where 101 and 201 were the id's of the rows I checked. I have to say I like the way of doing it that Mathieu has shown using the

Re: [PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread 1LT John W. Holmes
I appreciate all of the quick replies. I do have globals off. Currently, I have the values for each ID being returned in a array Array ( [0] = 101 [1] = 201 ) where 101 and 201 were the id's of the rows I checked. I have to say I like the way of doing it that Mathieu has shown using the

Re: [PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread Lewis Watson
Subject: Re: [PHP-DB] Checkboxes to gather rows to delete I appreciate all of the quick replies. I do have globals off. Currently, I have the values for each ID being returned in a array Array ( [0] = 101 [1] = 201 ) where 101 and 201 were the id's of the rows I checked. I have to say I

Re: [PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread 1LT John W. Holmes
Holmes... - Original Message - From: 1LT John W. Holmes [EMAIL PROTECTED] To: Lewis Watson [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 24, 2003 10:13 AM Subject: Re: [PHP-DB] Checkboxes to gather rows to delete I appreciate all of the quick replies. I do have

Re: [PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread Lewis Watson
]; [EMAIL PROTECTED] Sent: Monday, February 24, 2003 10:21 AM Subject: Re: [PHP-DB] Checkboxes to gather rows to delete Thats just it. I am just not sure what to do with the array before my delete from query now that I have it :-) Thanks... Lewis You don't have to do anything

Re: [PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread Lewis Watson
Subject: Re: [PHP-DB] Checkboxes to gather rows to delete Thanks. The below code returns each ID in an array like so... Array ( [0] =101 [1] = 201 ). Thanks for the help! Lewis $teacherID = $_POST[teacherID]; $deleteID = $_POST[deleteID]; if(isset($delete_teacher

Re: [PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread Jason Wong
On Monday 24 February 2003 23:57, George Pitcher wrote: Can I raise a point of principle here. My databases never have records deleted - instead they are marked as being deleted in a status field. That way, they are always there for reference. Unless you are running a system that needs the

RE: [PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread John W. Holmes
, 2003 10:36 AM Subject: Re: [PHP-DB] Checkboxes to gather rows to delete Thanks. The below code returns each ID in an array like so... Array ( [0] =101 [1] = 201 ). Thanks for the help! Lewis $teacherID = $_POST[teacherID]; $deleteID = $_POST[deleteID]; if(isset

Re: [PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread Lewis Watson
I think the problem is that I need to put the array into a comma delimited group Lewis - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: 'Lewis Watson' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 24, 2003 11:09 AM Subject: RE: [PHP-DB] Checkboxes

Re: [PHP-DB] Checkboxes to gather rows to delete

2003-02-24 Thread 1LT John W. Holmes
... - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: 'Lewis Watson' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 24, 2003 11:09 AM Subject: RE: [PHP-DB] Checkboxes to gather rows to delete Hi there, I have double checked the column namesIts giving me

[PHP-DB] checkboxes names values in mySQL (newbie)

2002-10-10 Thread John
I'm new at using PHP and mySQL, so please forgive my potentially naive question. I have a series of checkboxes with different values. The user can select any number of checkboxes, and I need to store this information in a mySQL table. 2 questions: Should I have a unique form name for each

Re: [PHP-DB] checkboxes names values in mySQL (newbie)

2002-10-10 Thread Andrey Sosnitsky
Hello, John. You wrote 10 îêòÿáðÿ 2002 ã., 23:40:10: J 2 questions: J Should I have a unique form name for each checkbox, and store it's J boolean value in the database, OR (is it more streamlined) .. J To create an array input type=checkbox name=apps value J =myarray[$i] with

[PHP-DB] Checkboxes, PHP, and MySQL

2001-12-20 Thread SpyProductions Support Team
I've looked around in a few of the PHP lists for an answer to this, but can't come up with one. Here's what I am doing: I have a form with a few checkboxes. When the information as to whether the checkboxes are checked or not is 'saved' into the MySQL table, they are represented by a value of

Re: [PHP-DB] Checkboxes, PHP, and MySQL

2001-12-20 Thread Paul DuBois
On Thu, Dec 20, 2001 at 11:40:14AM -0500, SpyProductions Support Team wrote: I've looked around in a few of the PHP lists for an answer to this, but can't come up with one. On this question, you'd be better off just reading an HTML reference. It doesn't matter what the value of a checkbox is.

RE: [PHP-DB] Checkboxes, PHP, and MySQL

2001-12-20 Thread Jonathan Hilgeman
be empty/non-existent. - Jonathan -Original Message- From: SpyProductions Support Team [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 8:40 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Checkboxes, PHP, and MySQL I've looked around in a few of the PHP lists for an answer

RE: [PHP-DB] Checkboxes, PHP, and MySQL

2001-12-20 Thread matt stewart
. -Original Message- From: SpyProductions Support Team [mailto:[EMAIL PROTECTED]] Sent: 20 December 2001 16:40 To: [EMAIL PROTECTED] Subject: [PHP-DB] Checkboxes, PHP, and MySQL I've looked around in a few of the PHP lists for an answer to this, but can't come up with one. Here's what I am doing: I

Re: [PHP-DB] Checkboxes, PHP, and MySQL

2001-12-20 Thread Jason Wong
On Friday 21 December 2001 00:40, SpyProductions Support Team wrote: I've looked around in a few of the PHP lists for an answer to this, but can't come up with one. Here's what I am doing: I have a form with a few checkboxes. When the information as to whether the checkboxes are checked

RE: [PHP-DB] Checkboxes, PHP, and MySQL

2001-12-20 Thread Jonathan Hilgeman
AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Checkboxes, PHP, and MySQL the value doesn't determine whether it's checked or not - it determines the value passed WHEN it's checked. try the lines below: echoinput type=/checkbox/ name=/firstvalue/ value=/1/; if ($result[32

Re: [PHP-DB] Checkboxes, PHP, and MySQL

2001-12-20 Thread Jim Lucas
Try this input type=checkbox name=firstvalue ?=($result[32]?checked:)? Jim - Original Message - From: SpyProductions Support Team [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 20, 2001 8:40 AM Subject: [PHP-DB] Checkboxes, PHP, and MySQL I've looked around

[PHP-DB] Checkboxes with mySQL

2001-09-07 Thread Cilfa
I have a database with articles from which I can make a selection of which articles to show. This selection is made by a form with checkboxes. In the mysql table is a field called pr. If there's a 1 in this field, the article should be shown for print, if there's a 0, it shouldn't. In the

RE: [PHP-DB] Checkboxes with mySQL

2001-09-07 Thread Rick Emery
articles SET pr=1 WHERE 0 || id=1 || id=3 || id=4 The 0 in the WHERE clause is just a place holder; it saves a little coding. Hope this helps rick -Original Message- From: Cilfa [mailto:[EMAIL PROTECTED]] Sent: Friday, September 07, 2001 7:38 AM To: [EMAIL PROTECTED] Subject: [PHP-DB