Welcome To SMK TI PEMBANGUNAN
Sebelum Masuk Forum , Log in terlebih dahulu

Join the forum, it's quick and easy

Welcome To SMK TI PEMBANGUNAN
Sebelum Masuk Forum , Log in terlebih dahulu
Welcome To SMK TI PEMBANGUNAN
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Pencarian
 
 

Display results as :
 


Rechercher Advanced Search

translator

User Yang Sedang Online
Total 4 uses online :: 0 Terdaftar, 0 Tersembunyi dan 4 Tamu

Tidak ada

User online terbanyak adalah 224 pada Sat Aug 21, 2010 12:24 pm

Encrypting Password

Go down

Encrypting Password Empty Encrypting Password

Post by Admin|Gana Sat Feb 06, 2010 2:30 pm

Syntax
Encrypting Password Spacer
<table border="0" cellpadding="0" cellspacing="5" width="100%">
<tr>
<td>
$password="123456";

md5($password);

Use md5(); to encrypts password to make it more secure
</td>
</tr>
</table>





<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="3" width="100%">
<tr>
<td><table bgcolor="#f4f9fb" border="0" cellpadding="0" cellspacing="1" width="100%">
<tr>
<td width="1%"> </td>
<td width="99%" height="20">Overview</td>
</tr>
<tr>
<td colspan="2" bgcolor="#eeeeee">Encrypting Password Spacer</td>
</tr>
<tr>
<td colspan="2" valign="top"><table border="0" cellpadding="0" cellspacing="5" width="100%">

<tr>
<td>Look
at these two databases, it's the same person and same info, the first
one we don't encrypt his password but the second one we encrypted his
password

</td>
</tr>
<tr>
<td align="center"><table bgcolor="#cccccc" border="0" cellpadding="0" cellspacing="1" width="100">
<tr>
<td>Encrypting Password Encrypt_password</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>when you encryte "john856" using this code, you'll see this result
"ad65d5054042fda44ba3fdc97cee80c6"
This is not a random result, everytime you encrypt the same password
you will get the same result.

$password="john856";
$encrypt_password=md5($password);
echo $encrypt_password;

</td>
</tr>

</table></td>
</tr>
</table></td>
</tr>
</table>






Example - Login
Encrypting Password Spacer
<table border="0" cellpadding="0" cellspacing="5" width="100%">
<tr>
<td>

This is an example Login with encrypted password but don't forget to
encrypt password and insert into database in sign up process.

// username and password sent from form
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];

// encrypt password
$encrypted_mypassword=md5($mypassword);

$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$encrypted_mypassword'";
$result=mysql_query($sql);</td></tr></table>
Admin|Gana
Admin|Gana
Commander
Commander

Zodiac : Taurus Jumlah posting : 635
Join date : 22.07.09
Age : 31
Lokasi : Depan LCD butut ..

https://smktipembangunan.forummotion.com

Kembali Ke Atas Go down

Kembali Ke Atas

- Similar topics

 
Permissions in this forum:
Anda tidak dapat menjawab topik