Ryan A wrote:
> Hi everyone,
> Am confused about what the @#%# is happening to my scripts because
> this was working yesterday, now i restarted my localhost machine and
> its not working now more....and its real simple stuff as you see.
>
> if(isset($id))
>  {
>  $result = count ($id);
> echo $result;
> echo $id[0]." ".$id[1]." ".$id[2]." ".$id[3]." ".$id[4];
>  exit;
>  }
>
> then i am passing 2 id[]'s like so:
>
http://localhost/BWH/Project/compareTesting.php?PHPSESSID=431984b7b39946fd74
> bf0b45b9771b54&id%5B2efwaf2%5D=20&id%5B2efwaf3%5D=21&type=1
>
> /* ***
> html code something like this:
> <input type=checkbox name='id[sh1]' value=3>
> <input type=checkbox name='id[sh2]' value=4>
> ***** */

hi ryan,

from your html-form you get:
$id = array(
    'sh1' => '3',
    'sh2' => '4',
);
(or something similar.)

so there is no $id[0] and so on, but $id['sh1'].

my suggestion:
if(isset($id))
{
$result = count($id);
echo $result;
echo implode(' ', $id);
exit;
}

hth SVEN




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to