Category Covered

How to automatically encrypted users password

 

A new user completes the registration form, his password will be encrypted automatically by using the following code into your connection page up page .

<?php

$users = users_table_name;

function addNewUser($username, $password){
   global $connection;
   $password = md5($password);
   $enc = "INSERT  INTO  ".users."  VALUES ('$username', '$password')";
   return mysql_query($enc, $connection);
}