I am trying to work out how i would insert or update a post manually without using the admin panel
I have found the function wp_insert_post in post.php file
1) Is this a standalone function or part of some class. Im not a php programmer
2) It uses global $wpdb and then uses this object through the function e,g, $wpdb->insert_id;
If i wanted to connect to a different wordpress database could i do this $wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST) inside the wp_insert_post function.
Naturally I will go off and try these things but i dont want to be barking up the wrong tree :)