I have a small problem with custom fields. This is what I am trying to do:
- Whenever a new post is added, I check what category is selected, grab the sub categories and create custom fields based on the sub categories. Each custom field has a value of "0".
- On each post I get the sub categories again and create checkboxes for each. When a submit button is clicked, if the checkbox is checked, the value of the custom field that matches the sub category is changed to "1". Then I check custom field values. If value is "1" some data displays, if value is "0" nothing displays.
Everything works great. The only problem I am facing is for custom fields with more than one word. Ex. "Firefox" works, but if the custom field is "Firefox Browser" it won't update.
Does anybody have any ideas why this happens?