Navigating the log in button

Hi guys, I want my login and sign up page to be navigated to the next page once you press sign up and the log in button. Here is my html for the log in form:


Email

            <div class="input-group">
                <label for="password">Password</label>
                <input type="password" id="password" name="password" required>
            </div>

            <button type="submit" class="submit-btn">Log In</button>
            
        
        </form>

        <p class="footer">Don't have an account? <a href="sign up job forum.html">Sign up</a></p>
    </div>

and here is my sign up form:


Full Name

            <div class="input-group">
                <label for="email">Email</label>
                <input type="email" id="email" name="email" required>
            </div>

            <div class="input-group">
                <label for="password">Password</label>
                <input type="password" id="password" name="password" required>
            </div>

            <div class="input-group">
                <label for="confirm-password">Confirm Password</label>
                <input type="password" id="confirm-password" name="confirm-password" required>
            </div>

            <button type="submit" class="submit-btn">Sign Up</button>
        </form>

        <p class="footer">Already have an account? <a href="login job forum.html">Log in</a></p> 

Hello,
From I can understand, you want the log in /sign up buttons to redirect the user to the respective page when clicked, assuming that you want normal link-based redirection, you can change the log in button element to be a link instead then add some CSS styles to make it look like a normal button
<button type="submit" class="submit-btn">Log In</button>

Thank you for helping but I already had that code, I need to know how I can be redirected to my next page once I click sign up/log in. I get a syntax error when I use the <a href element. I may have done something wrong in my code so please could you explain further? Again thank you for your reply.

Hello @test !

I found this information that may help you resolve the issue. I believe it is what was being explained in the previous post.

<body>
	<a href="another-page.html" class="button-class">
      Go to Another Page</a>
</body>

By creating a link to the next page when the Login is clicked, it will redirect to the page you want it to, I believe.

Here is the link to where I found this information.

Wishing you good progress on your coding journey. :slightly_smiling_face:

2 Likes