title: Wordpress: executing function when saving or editing post
body: <p>This is what I'm trying to accomplish: 
  If I'm adding or editing post I want to run a function that puts post_id, all the custom field values and category ids to some other db table I've created. 
  I just want to know how to execute this function and how to get the values.</p>