The Encryption Procedure for MySQL in Web Programming

Asked By 50 points N/A Posted on -
qa-featured

Good day,

I am a newbie in web programming and I am coding a registration page. For this, I will just ask the encryption procedure for MySQL.

Thank you so much.

SHARE
Best Answer by Williams Todd
Best Answer
Best Answer
Answered By 0 points N/A #196768

The Encryption Procedure for MySQL in Web Programming

qa-featured

Hello,

This a short code to help you understand how to use Encryption using PHP and MySql.  Created a Text Field for the username and the password.  A necessary step necessary to access the database. You will enter that information in the query with an encryption request. 

$query = "SELECT USid, Pid, other_fields FROM users_table WHERE username = $_REQUEST['USid'] AND password = encrypt($_REQUEST['Pid'])";
$CheckDT = mysql_query($query) or ('Query no data: ' . mysql_err());
  if (RowSelMet($CheckDT) == 1) { // login enabled } 
else
// It is not working{ enter something }
 
I have another script that uses PDO or MySQLi.  The file Encryption.txt has more code and it is a good example showing how to use Encryption in a login page.

I hope this is very helpful. 

Answered By 0 points N/A #131990

The Encryption Procedure for MySQL in Web Programming

qa-featured

Hi,

I am assuming that you have Apache, Mysql and PHP installed in your system. In case you haven't, just download xampp. Now open phpmyadmin home page, Login to your account. Now you will see an option create new database, type here the name you want to give it For ex. "database_for_registration" and then click on the create button. Now create the table and enter the fields to your table for ex. username and password and set privileges.Now you need to create database connection page.

Regards,

Laz Zebbena

Related Questions