register page partially written and MySQL query method fixed