How I create php login form?

Asked By 7060 points N/A Posted on -
qa-featured

Hello every one, php is server script, php always stay to connect mysql database. php have a many function. Every function is very unique work together.

SHARE
Best Answer by Luker Malcom
Answered By 0 points N/A #195380

How I create php login form?

qa-featured

Hello

I provided you with basic tutorial for making login form. It consists of 3 php files: main login, check login and login success. This tutorial is made out of 5 steps which you need to follow. It connects to mysql database.

Tutorial is very easy and you can find it on this link: http://www.phpeasystep.com/phptu/6.html

Regards.

Answered By 0 points N/A #195381

How I create php login form?

qa-featured

Hi

here is a php login script  :

<html>

   <head>
   
      <title>Création d'un formulaire de connexion en HTML</title>
      
   </head>
   
   <body>
      
      <h2>Connexion au site</h2>
   
      <form action="connexion.php" method="post">
         
         <table>
            
            <tr>
               
               <td><label for="login"><strong>Nom de compte</strong></label></td>
               <td><input type="text" name="login" id="login"/></td>
               
            </tr>
            
            <tr>
               
               <td><label for="pass"><strong>Mot de passe</strong></label></td>
               <td><input type="password" name="pass" id="pass"/></td>
               
            </tr>
            
         </table>
         
         <input type="submit" name="connexion" value="Se connecter"/>
      
      </form>
   
   </body>
   
</html>

Good Luck !

Best Answer
Best Answer
Answered By 0 points N/A #84922

How I create php login form?

qa-featured

Hi,

Believe it or not, PHP is an easy and interesting programming language, making it very popular among beginners and even professional developers. You can make an entire web page using PHP scripts (but to make it more appealing aesthetically, you will need to incorporate some HTML and CSS). PHP actually stands for HYPERTEXT PRE-PROCESSOR and it is a server-side language. If you are new to PHP, there are three things that you must have in order to create your very first login form: a server to connect to (WampServer), a text editor (notepad will do) and MySQL (for database).

If you’ve got all of it installed on your computer, you may now start creating a login form. Here is a good basic example (without connecting to database). Copy it on your notepad and name it ‘adminLogin.php’:

<?php

$adminId = $_POST['user'];

$adminPass = $_POST['password'];

 

if(isset($_POST['submit']) && $_POST['submit'] == "submit"){

          if($adminId!= "admin01" || $adminPass!= "pass")         {

                   echo "Invalid username and/or password. Please try again.";

          }

          else    {

                   echo "You successfully logged in as administrator.";

          }

}?>

<form action="adminLogin.php" method="post">

 <table>

          <tr><td>Admin ID:</td><td><input type="text" name="user" value=""/></td></tr>

          <tr><td>Password:</td><td><input type="password" name="password" value=""/></td></tr>

          <tr><td><input type="submit" name="submit" value="submit"/></td></tr>

 </table>

</form>

Login/Register to Answer

Related Questions