JavaScript validates the form before it is submitted to the server. For example, you get radio buttons, drop-down options, and regular text boxes. therefore, I have used IDs for both form, one id for login form and second id for register form such as