Running a PHP SQL script on a wordpress page

Your problem involves a technique called REST API. WordPress supports it. All you need is to make a pluginregister_rest_field → pass your data through it.

What you want to do may seems simple but it is still lot of works. Also, remember to tighten plugin security.

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