Extract categories from post data instead of hardcoding.