I need a simple simple example of encrypting / decrypting text data into a mySQL database using PHP and the AES Encrypt / Decrypt functions:
This is required purely for the purpose of a proof of concept for another project.
The solution should have two pages.
A form with a single text field and a 'submit' button.
Stored the text in a mySQL database table.
The text must be encrypted using mySQL AES Encrypt.
The field should have the label 'Enter text:' and have room for 50 characters.
Table name: text
Field name: the_text
This page reads the database, decrypts the data using AES Decrypt and displays the decrypted the text on the page.
If there are multiple 'text' records, display them in an unordered list.
We will want to view the encrypted data in the database.
1. The PHP files
2. The mySQL database.
3. The files must be documented. Your approach must be explained in commented within the file.
1. Must use the PHP PDO interface to mySQL.
2. Do not use an OOP approach.