Can’t pass the variable from a select to PHP query

var selectedValue=$(this).children(":selected").val();

Use this for getting value for select tag

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