-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
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:
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
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
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
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
[ 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
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