Tags
PHP , HTML , XHTML
Asked 3 years ago
20 May 2021
Views 549
samir

samir posted

how to create login form ?

how to create login form ?
Nilesh

Nilesh
answered Oct 8 '21 00:00

following code for login form , use boostrap for better view.

<form method="post">
<input type="text" class="user" name="email" placeholder="Enter your User Name" required="">
<input type="password" name="password" class="lock" placeholder="password">
<input type="submit" name="sign_in" value="Sign In">
</form>


The login form should have :

1. Email input <input type="text" name="email" >
2. Password input <input type="password" name="password" >

wrap both input with <form > tag, and use post method to send data as POST not GET.

<form method="post" action="login.php">
 <input type="text"   name="email" >
<input type="password" name="password" >
<input type="submit" name="login" value="signin" />
 </form>


put a button to submit the form.
very easy, isn't it?
Post Answer