WordPress listen to $_POST in functions.php

Please change the type

type : "GET",

to

type : "POST",

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