Post content is cleared when updating

You can modify your code:

add_action( 'save_post_subpage', 'eb_save_subpage_data' );
function eb_save_subpage_data( $post_id ) {

You have to use this action to add custom fields, default post data are saved automatically.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)