Update contact.php

Changed hardcoded SQL to $query

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32023&start=0