Trying to create an edit page link?

What you want is the get_edit_post_link function.

Usage:

echo '<a href="'.get_edit_post_link( $post_id ).'">edit</a>';

Your use of global $post and the other issue is a separate problem, you should ask a new question and provide more details ( including the code for the template being used )

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