bodaelnegm
Audience Engagement Expert
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.
This simple PHP source code will help you to save the data to the database using this simple query include the INSERT Statement.
Database Name: md5_register
Output
Download
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.
- <form
class
=
"form-horizontal"
method
=
"POST"
>
- <div
class
=
"control-group"
>
- <label
class
=
"control-label"
for
=
"inputEmail"
>
Username</
label
>
- <div
class
=
"controls"
>
- <input
type
=
"text"
id
=
"inputEmail"
name
=
"username"
placeholder=
"Username"
required>
- </
div
>
- </
div
>
- <div
class
=
"control-group"
>
- <label
class
=
"control-label"
for
=
"inputPassword"
>
Password</
label
>
- <div
class
=
"controls"
>
- <input
type
=
"text"
id
=
"inputPassword"
name
=
"password"
placeholder=
"Password"
required>
- </
div
>
- </
div
>
- <div
class
=
"control-group"
>
- <div
class
=
"controls"
>
- <button
type
=
"submit"
name
=
"register"
class
=
"btn btn-success"
>
Save</
button
>
- </
div
>
- </
div
>
- </
form
>
This simple PHP source code will help you to save the data to the database using this simple query include the INSERT Statement.
- <?php
- if
(
isset
(
$_POST
[
'register'
]
)
)
- {
- $username
=
$_POST
[
'username'
]
;
- $password
=
md5
(
$_POST
[
'password'
]
)
;
- mysql_query
(
"insert into user (username,password) values('$username
','$password
')"
)
or die
(
mysql_error
(
)
)
;
- header
(
'location:index.php'
)
;
- }
- ?>
Database Name: md5_register
Output

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