Got it working nick

I've attached the changed htcall.php file here. The main problem I think was using $DB_site->query and not query_first for the select queries, I made a few other minor changes as well and its working great as far as I can tell
The only improvement I can see is being able to see the hackid on the main screen, other than that its great, thanks for sharing