Allowing Users to Delete Their Posts

I don’t know what “it’s not working” you mean. It gives error or what?
Maybe you should echo $_REQUEST[‘p_id’] first before delete it, just make sure you got the request. Or create a variable to store wp_delete_post and check if it works or not.

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