Is this the right way to execute some PHP in my plugin after a button click on an options page?

Try using ‘init’ action hook to handle the submit trigger. Create a new object of your class in the hooked function and call the member function.

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