• Register now to get access to thousands of Tutorials, Leaked content, Hot NSFW and much more. Join us as we build and grow the community.

Registration using MD5 in PHP

bodaelnegm

Audience Engagement Expert
B Rep
0
0
0
Rep
0
B Vouches
0
0
0
Vouches
0
Posts
55
Likes
74
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
This source code will teach you on how to create simple Registration using MD5 in PHP. The feature of this simple tutorial is to save the data to the database then the password is encrypted using the MD5 function. To have this source code, kindly download the source code below to learn the MD5 function in PHP Programming. If you have a question in this tutorial, leave a comment below. Thank you.

Registration Form

This simple markup contains all form field to save the data to the database. Take a look the source code below, then try it.

  1. <form

    class

    =

    "form-horizontal"

    method

    =

    "POST"

    >
  2. <div

    class

    =

    "control-group"

    >
  3. <label

    class

    =

    "control-label"

    for

    =

    "inputEmail"

    >

    Username</

    label

    >
  4. <div

    class

    =

    "controls"

    >
  5. <input

    type

    =

    "text"

    id

    =

    "inputEmail"

    name

    =

    "username"

    placeholder=

    "Username"

    required>
  6. </

    div

    >
  7. </

    div

    >
  8. <div

    class

    =

    "control-group"

    >
  9. <label

    class

    =

    "control-label"

    for

    =

    "inputPassword"

    >

    Password</

    label

    >
  10. <div

    class

    =

    "controls"

    >
  11. <input

    type

    =

    "text"

    id

    =

    "inputPassword"

    name

    =

    "password"

    placeholder=

    "Password"

    required>
  12. </

    div

    >
  13. </

    div

    >
  14. <div

    class

    =

    "control-group"

    >
  15. <div

    class

    =

    "controls"

    >
  16. <button

    type

    =

    "submit"

    name

    =

    "register"

    class

    =

    "btn btn-success"

    >

    Save</

    button

    >
  17. </

    div

    >
  18. </

    div

    >
  19. </

    form

    >

This simple PHP source code will help you to save the data to the database using this simple query include the INSERT Statement.

  1. <?php

  2. if

    (

    isset

    (

    $_POST

    [

    'register'

    ]

    )

    )
  3. {
  4. $username

    =

    $_POST

    [

    'username'

    ]

    ;
  5. $password

    =

    md5

    (

    $_POST

    [

    'password'

    ]

    )

    ;
  6. mysql_query

    (

    "insert into user (username,password) values('$username

    ','$password

    ')"

    )

    or die

    (

    mysql_error

    (

    )

    )

    ;
  7. header

    (

    'location:index.php'

    )

    ;
  8. }

  9. ?>

Database Name: md5_register
Output

register_0.jpg



Download
You must upgrade your account or reply in the thread to view the hidden content.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

452,513

356,536

356,563

Top
Raidforums