RE: [PHP-DB] Re: deleting records using a checkbox

2003-03-21 Thread Ford, Mike [LSS]
-Original Message- From: Paul Burney [mailto:[EMAIL PROTECTED] Sent: 20 March 2003 15:22 on 3/20/03 1:45 AM, olinux at [EMAIL PROTECTED] appended the following bits to my mbox: [ and ] are illegal characters. #javascript I'm coming into this a bit late, so I'm not sure

Re: [PHP-DB] Re: deleting records using a checkbox

2003-03-20 Thread Paul Burney
on 3/20/03 1:45 AM, olinux at [EMAIL PROTECTED] appended the following bits to my mbox: [ and ] are illegal characters. #javascript I'm coming into this a bit late, so I'm not sure exactly what you wish to do. You can use JavaScript to refer to checkbox items in the format:

RE: [PHP-DB] Re: deleting records using a checkbox

2003-03-19 Thread John W. Holmes
INPUT TYPE=CHECKBOX NAME=DELETE[?php echo message_id ?] VALUE=Y you will get an array named DELETE. check for every element in array DELETE foreach($_POST['DELETE'] as $message_id = $val) { if($val ==1) { You mean if($val == 'Y') ---John W. Holmes... PHP Architect - A monthly

Re: [PHP-DB] Re: deleting records using a checkbox

2003-03-19 Thread Foong
oh yes, Sorry my mistake should be: if($val == 'Y') Foong John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] INPUT TYPE=CHECKBOX NAME=DELETE[?php echo message_id ?] VALUE=Y you will get an array named DELETE. check for every element in array DELETE

Re: [PHP-DB] Re: deleting records using a checkbox

2003-03-19 Thread olinux
Since this is not valid HTML - how would you accomplish this using valid HTML? INPUT TYPE=CHECKBOX NAME=DELETE[?php echo message_id ?] VALUE=Y i.e. Yahoo mail does checkboxes like this: input type=checkbox name=Mid value=3398_926227_29517_1491_1405_0_273578_2841_2195311700

RE: [PHP-DB] Re: deleting records using a checkbox

2003-03-19 Thread John W. Holmes
Since this is not valid HTML - how would you accomplish this using valid HTML? INPUT TYPE=CHECKBOX NAME=DELETE[?php echo message_id ?] VALUE=Y How is that not valid HTML? You could use: input type=checkbox name=delete[] value=?=$message_id? ---John Holmes... -- PHP Database

RE: [PHP-DB] Re: deleting records using a checkbox

2003-03-19 Thread olinux
[ and ] are illegal characters. #javascript Here are a couple links. Looks like the solution is in parsing the form headers. try some google searches for 'checkbox array javascript php' Here's an interesting one: http://jscript.dk/faq/php.asp usually the only solution offered is how to work

[PHP-DB] Re: deleting records using a checkbox

2003-03-18 Thread Foong
helo, make your checkbos name into array: INPUT TYPE=CHECKBOX NAME=DELETE[?php echo message_id ?] VALUE=Y you will get an array named DELETE. check for every element in array DELETE foreach($_POST['DELETE'] as $message_id = $val) { if($val ==1) { // delete record where messahe ID