How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask TheDoctor Your Own Question

TheDoctor
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1757
Experience:  M.S. in Internet Information Systems
59032869
Type Your Homework Question Here...
TheDoctor is online now
A new question is answered every 9 seconds

Write a Web page in PHP/HTML

This answer was rated:

I am looking for help in the following: Write a Web page in PHP/HTML to store and retrieve encrypted data. To create and test the Web page: • Create a table called EncryptTable in MySQL with a column EncryptColumn to store the encrypted value. • Create a Web page with two buttons, Encrypt and Decrypt. Clicking on Encrypt should encrypt the data in a text box in the Web page and write the encrypted data in EncryptColumn. Clicking on Decrypt should decrypt the data in the EncryptColumn and display the decrypted data on the same Web page. submit a report that explains the project solution in an MS Word document Optional Information: Computer OS: Windows 7 Browser: IE Submitted: 360 days and 14 hours ago. Category: Programming Value: $45 Status: CLOSED


 


Here is my assignment.


 


Write a Web page in PHP/HTML to store and retrieve encrypted data. Deploy the Web page on Apache for the Windows environment. To create and test the Web page:



  • Create a table called EncryptTable in MySQL with a column EncryptColumn to store the encrypted value.

  • Create a Web page with two buttons, Encrypt and Decrypt. Clicking on Encrypt should encrypt the data in a text box in the Web page and write the encrypted data in EncryptColumn. Clicking on Decrypt should decrypt the data in the EncryptColumn and display the decrypted data on the same Web page.


 


 


I have already created the SQL databases.

Hello! I am a Moderator for this topic. Unfortunately, the Professional you requested is unavailable. I have opened your question to all of the Programming Homework Professionals and marked it high priority. You will receive an email notification as soon as a Professional replies, otherwise we will touch base again. Thank you for your patience!

Best,

Angela
Hello and thank you for using JustAnswer. It would be my pleasure to assist you with this.

You state that you already have the database. Can you please send me the database name and table schema? You can get this in MySQL by doing SHOW CREATE TABLE tablename

You can also run an export in either phpMyAdmin or MySQL Workbench and then send me the resulting SQL.

This way, I will be able to write the code to match your schema exactly.

Thank you
Customer: replied 3 years ago.

Database name is XXXXX XXXXX is encrypttable


Is below what you need. So you understand what I am looking for?


 


Kind of like this website..... http://md5encryption.com/


 


but prettier...lol


 


 


 


-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 11, 2013 at 11:51 PM
-- Server version: 5.5.24-log
-- PHP Version: 5.4.3


SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";



/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;


--
-- Database: `customers`
--


-- --------------------------------------------------------


--
-- Table structure for table `encrypttable`
--


CREATE TABLE IF NOT EXISTS `encrypttable` (
`EncryptColumn` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


--
-- Dumping data for table `encrypttable`
--


INSERT INTO `encrypttable` (`EncryptColumn`) VALUES
(611),
(611),
(611),
(611),
(611);


/*!40101 SET [email protected]_CHARACTER_SET_CLIENT */;
/*!40101 SET [email protected]_CHARACTER_SET_RESULTS */;
/*!40101 SET [email protected]_COLLATION_CONNECTION */;

Hello again,

Yes. That is what I needed. And I understand what you need.

I will make it completely functional. I'll try not to make it as hideous as that example.

Thank you
Hello again!

You can download the php file here:


Before you can use this, you must change our database a little. Your have your column as an integer field. That will not work because an encrypted string will be a character field, not a numeric field. So run this query to update your database:

ALTER TABLE encrypttable MODIFY COLUMN encryptcolumn TEXT;

Next, make sure that the connect data in the PHP file matches your username and password XXXXX yoru MySQL. On lines 13 and 29 of the PHP file you will see that I have the username set to "root" and the password XXXXX to "" (empty). You will want to change this if that is not what you are using.

You should note that the example you gave a link to is an MD5 hash, not an encryption. A hash is a one-way string alteration. You cannot un-MD5 (unhash) a string. There is a thing called rainbow table that tries to do so by brute force. But there is no technological way of translating a hash ack to the original string.

In contrast, encryption is two-ways. It changes the string into a bunch of data that is not readable and can be converted back as long as you have the key.

I have implemented a common encryption function in PHP and put it in your page. It appears that this assignment is trying to get you to demonstrate the use of databases and encryption. This does exaclty that. You should be able to submit this and receive an excellent grade.

Let me know if you have any issues. I'm here to help and will do so until you are completely satisfied.

Please remember to rate my answer. It is the only way that I receive credit for my time and effort. If you require more assistance, simply continue our conversation before leaving any rating.

If you ever require assistance in the future, please feel free to request me direction by starting your questions with **For TheDoctor**.

Thank you so much for using JustAnswer. Have a great night!
Customer: replied 3 years ago.

Doctor,


 


Wow, you guys are truly that good. It is upsetting that I had to pay for help. But you and your expertise are well worth it. I just wish I understood the php file better and what was happening with in. The HTML I get. Looks I will have to figure the rest of my assignments on my own.


 


Thank you so much.


 

THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1757
Experience: M.S. in Internet Information Systems
TheDoctor and 4 other Homework Specialists are ready to help you

Related Homework Questions