Re: Passing advcheckbox correctly with HTML_quickform

From: Date: Fri, 08 Dec 2006 19:18:55 +0000
Subject: Re: Passing advcheckbox correctly with HTML_quickform
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26043@lists.php.net to get a copy of this message
On 12/8/06, rav k <rav220@hotmail.com> wrote:
I'm adding advcheckboxes dynamically to my form like this: $skills[] = &HTML_QuickForm::createElement('advcheckbox', $row['skillid'], null,'<b>'.$row['skillname'].'</b>'.' : '.$row['description']); This is working ok, I'm adding the right number of advcheckboxes which are in my skills table. What I want to do next is get the boxes checked and save them to another table.. function testadd($vars) {
        //$s=$var['$skills'];
        var_dump($var['skills']);
        $types=array('integer','integer');
        /*if (isset($s)) {
                foreach($s as $s_id) {
                        echo "$var['userid'] and $s_id";
                }
        }*/
} That is what I have, but the var_dump returns NULL... so how can I correctly pass the name of each advcheckbox checked?? I haven't stated the value of each advcheckbox as the name includes the 'skillid' which is what I want to save...
Typo? $var != $vars $var has not been set, so var_dump should be returning NULL. try var_dump($vars) to see what is passed to the callback. -- -Brett http:saltybeagle.com aim:ianswerq

« previous php.pear.general (#26043) next »