Added check on empty fields in register.php