Database entry removed on browser refresh, Ajax PHP jQuery

Turns out that the $wpdb->update was running based on user being signed in via PHP. The variables that were placed into the condition statements were being ignored. To fix the issue I removed the $wpdb->update portion of the code from the ‘user is signed in’ condition and moved it to the ‘if empty’ conditional statements.

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