Edit Post custom options not working

You need the $post_id passed in to the function you are calling from the hook. Try making your function declaration like this:

function slider_data( $post_id ) 

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