Anyone Good in HTML Codes?


12Hearts

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?

Link to comment
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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.