Database Query not working

First, this line

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

should be

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