What the heck is if ($value = "on")... while this makes perfect logic sense, how does the computer know what "on" is? All the computer knows is in
$visitor_profession[0] = "lighting showroom";
etc... etc...
That is all it knows. So when you check and see if
$visitor_profession[0] == "on";
It says "Nope the string 'lighting showroom' is not equal to the string 'on'."
I think that is right... I never really use list and each (more of an iterative i,j,k guy. 🙂 ) Try this instead
for($i = 0; $i > sizeof($visitor_profession); $i++) {
db_query("INSERT visitor_profession ".
"(visitor_id, $visitor_profession[$i]) ". "VALUES ($visitor_id, $visitor_profession[$i])");
}
Unless I am missing something. I think that is what you are tring to do?!?