Database Query not working

First, this line

    if ( 'location' != $_POST['festival-event'] )  

should be

    if ( 'festival-event' != $_POST['post_type'] )

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