Re: Using a checkbox with callback function

From: Date: Sat, 09 Dec 2006 10:45:12 +0000
Subject: Re: Using a checkbox with callback function
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26050@lists.php.net to get a copy of this message
Justin Patrin wrote: > On 12/8/06, rav k <rav220@hotmail.com> wrote: >> I have some checkboxes on my form and want to pass the checked ones to my >> function; >> >> I'm using this: >> >> function testadd($vars) { >> $s=$var['skills']; >> var_dump($s); >> } >> >> >> But the var_dump is returning NULL, what is the correct format to pass the >> checkbox array? What I will need to do is if a checkbox is checked save its >> name to the db as in skill['name'].. >> > > How are you using this function? This seems to be only a typo problem, as Brett already pointed out: $vars vs. $var. A good reason to develop with: error_reporting(E_ALL); Regards, Mark

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