Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: HTML codes  (Read 4079 times)

0 Members and 1 Guest are viewing this topic.

william54321

    Topic Starter


    Rookie

    • Experience: Experienced
    • OS: Windows XP
    HTML codes
    « on: December 06, 2011, 04:06:54 PM »
    Is there a HTML code for a log in page that has a username or password

    Rob Pomeroy



      Prodigy

    • Systems Architect
    • Thanked: 124
      • Me
    • Experience: Expert
    • OS: Other
    Re: HTML codes
    « Reply #1 on: December 07, 2011, 07:16:41 AM »
    Not with any meaningful kind of security.  Securely logging in requires some server-side coding (e.g. PHP or Ruby), not just HTML/javascript on the client side.
    Only able to visit the forums sporadically, sorry.

    Geek & Dummy - honest news, reviews and howtos

    lina19



      Rookie

      • Experience: Beginner
      • OS: Unknown
      Re: HTML codes
      « Reply #2 on: January 07, 2012, 02:26:43 AM »
      hi william...

      i write something for you....it works....take your username and password entered...now you need to validate the value obtained from your textbox in a database....

      <?php
      if (isset($_POST['but_ok'])) {
      $u=$_POST['username'];
      $pass=$_POST['password'];
      echo 'username is ='.$u.' and password is '.$pass;
      }
      ?>


      <html>
      <form id="loginpage" name="loginpage" method="post" action="#">

         <table border=1>
            <tr>
               <td>Username :</td>
               <td><input type="text" name="username" id="username"></td>
            </tr>
         
            <tr>
               <td>Password   :</td>
               <td><input type="password" name="password" id="password"></td>
            </tr>
         
            <tr>
               <td><input type="submit" name="but_ok" id="but_ok" value="ok" /></td>
            </tr>

            
         </table>
      </form>
      </html>
         

      hope it helps...