Re: [PHP-DB] checkboxes

2005-01-21 Thread Craig Hoffman
27;m sure somebody 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: [email protected] Cc: Richard Hutchins Subject: Re: [PHP-DB] checkboxes I've tried that and it still doesn&

RE: [PHP-DB] checkboxes

2005-01-21 Thread Hutchins, Richard
array will be empty and, I think, won't even be sent in the $_POST array. I'm sure somebody 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: [email protected] Cc: Rich

Re: [PHP-DB] checkboxes

2005-01-21 Thread Craig Hoffman
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 thusly: name="comp

RE: [PHP-DB] checkboxes

2005-01-21 Thread Hutchins, Richard
Probably all you need to do is name your checkboxes as an array thusly: name="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

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 > checkb

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 18:11, Stuart Felenstein wrote: > Okay, I'll take a look. Usually, as in this case, I > did perform an extensive search for an answer. I did > not find one however that really addressed my > particular intended use of checkboxes. Many articles, > forum post, etc were

Re: [PHP-DB] Checkboxes on repeat regions

2004-12-06 Thread Stuart Felenstein
--- Jason Wong <[EMAIL PROTECTED]> wrote: > I understand from your previous postings that you > use Dreamweaver (to do at > least part of your coding). If you are at all > serious about coding with PHP > (ie you want to do stuff that is any more advanced > than the most basic stuff) > then you

Re: [PHP-DB] Checkboxes on repeat regions

2004-12-06 Thread Jason Wong
On Sunday 05 December 2004 20:53, Stuart Felenstein wrote: > I have this form that is set up like this: [snip] I understand from your previous postings that you use Dreamweaver (to do at least part of your coding). If you are at all serious about coding with PHP (ie you want to do stuff that i

Re: [PHP-DB] checkboxes and loops

2004-03-29 Thread John W. Holmes
matthew perry wrote: $counter++; *Bad solution 2 (doesn't work)*** $counter = 1; while (<>) { if ($box . $counter == 'delete') <> $counter++; } *** if(${$box . $counter} == 'delete') However, like someone else said, if you named your che

RE: [PHP-DB] checkboxes and loops

2004-03-29 Thread Duane Lakoduk
I am relatively new with PHP, but have done this many times with ASP. First, I would not assign the counter value to the checkbox as you are now. Use the ID (identity) value from the database for the applicant record instead. Since ONLY the checkboxes that are checked will be submitted, you can ju

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:

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

2003-02-25 Thread Lewis Watson
- Original Message - From: "Lewis Watson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 9:35 AM Subject: [PHP-DB] Checkboxes to gather rows to delete > I have a mysql database with a table using one column as a primary key. > (rowID). On a php page I use a q

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

2003-02-24 Thread 1LT John W. Holmes
re. ---John 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] Check

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

2003-02-24 Thread Lewis Watson
http://www.phparch.com/ > > > > > - Original Message - > > From: "1LT John W. Holmes" <[EMAIL PROTECTED]> > > To: "Lewis Watson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Monday, February 24, 2003 10:36 AM > &g

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

2003-02-24 Thread John W. Holmes
t;Lewis Watson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Monday, February 24, 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... > > &

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

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

2003-02-24 Thread Lewis Watson
D]> Sent: Monday, February 24, 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 > > > > $teacher

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

2003-02-24 Thread 1LT John W. Holmes
> 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)) { > This is where I should loop through checking for the chosen

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

2003-02-24 Thread Lewis Watson
delete. } print ""; print ""; - Original Message - From: "1LT John W. Holmes" <[EMAIL PROTECTED]> To: "Lewis Watson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 10:21 AM Subject: Re: [PHP-D

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

2003-02-24 Thread 1LT John W. Holmes
elp you put it all together. ---John 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

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

2003-02-24 Thread Lewis Watson
L 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 globals off. Currently, I > > have the values for each ID being returned in a array Array ( [0] => >

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

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 expl

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

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

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 pos

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=myarray[$i]> with the same name but different value

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

2001-12-20 Thread Jim Lucas
Try this > 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 in a few of the PHP lists for an answer to this, but > can't

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

2001-12-20 Thread Pierre-Alain Joye
Only one link should solve your problem :) http://www.w3.org/TR/html401/interact/forms.html#h-17.4 HTH pa -- Pierre-Alain Joye Freelance Developpements et Services web/intranet [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

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

2001-12-20 Thread Jonathan Hilgeman
Or a better, more-visual way might be: "; ?> - Jonathan -Original Message- From: matt stewart [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 8:45 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Checkboxes, PHP, and MySQL the value

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 ch

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

2001-12-20 Thread matt stewart
the value doesn't determine whether it's checked or not - it determines the value passed WHEN it's checked. try the lines below: echo""; }else{ echo">"; } or something along these lines. -Original Message- From: SpyProductions Support Team [mailto:[EMAIL PROTECTED]] Sent: 20 Decem

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

2001-12-20 Thread Jonathan Hilgeman
It's not the checkbox's VALUE attribute that determines whether it is checked or not. If you add the empty attribute CHECKED, then the checkbox will be checked. Example: VarCheck1 will be checked, and VarCheck2 will not be checked. A checkbox will only have a value on submission IF IT IS CHEC

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 with mySQL

2001-09-07 Thread Rick Emery
You have to check each checkbox value in you selection criteria. Somthing like: $query = "UPDATE articles SET pr=1 WHERE 0"; # assume $nbr is size of array $p for($i=0; $i<$nbr;$i++) { if( isset($p[$i]) ) { $query .= "|| id=$p[$i] "; } This will construct a query that looks like: UPDAT