Custom Meta Box calling JS function twice

Put the JS in the admin_footer. If the Widgets are moved, your JS tag code can be duplicated hence called twice.

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