How to get permalink in foreach loop

You should use get_permalink function and pass $page as an argument.

foreach( $page_children as $page ) :

  echo $page->post_title;
  get_permalink($page);

endforeach;

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