Page reload occurs before request finishes

you should use

return false;

at the end of the js function send_invitation() to prevent default reload action

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