Passing advcheckbox correctly with HTML_quickform
| From: | rav k | Date: | Fri, 08 Dec 2006 16:30:09 +0000 |
| Subject: | Passing advcheckbox correctly with HTML_quickform | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-26032@lists.php.net to get a copy of this message | ||
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...
Thanks
www.bitesoftware.com - software for a better lifestyle
_________________________________________________________________
Find Singles In Your Area Now With Match.com! msnuk.match.com