Rewrote lock.php (now using mysqli instead of DEPRECEATED mysql )