12Hearts

Anyone Good in HTML Codes?

Recommended Posts

Hello, I am trying to make my website with a login and whatever and the usernames and passwords are limited

I have made the Html code with its CSS partner:

<form class="login-form">
<input type="text" placeholder="username">

This was used as the username

<input type="password" placeholder="password">

this was used as the password

Now, I'm not that much of a genius in coding as others are, but I'm pretty sure this should work right? RIGHT?

Well, whenever I type in the username and password I have placed the username and password box thingy disappears, and I'm still not logged in, anyone knows why?

Share this post


Link to post
Share on other sites

You aren't sending the user who is trying to login anywhere, you do this in your <form> tag declaration and specify what page they are sent to when they login or to verify the login details.

<form action="login.html" class="login-form">
  <input type="text" id="username" placeholder="Username">
  <input type="password" id="password">
  <button type="submit">Login</button>
</form>

When the user presses the submit button, they are then transferred to the 'login.html' page or whatever other page you want to specify.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.