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: 1461
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

Resolved Question:

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.

Submitted: 1 year ago.
Category: Homework
Expert:  Angela--Mod replied 1 year ago.
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
Expert:  TheDoctor replied 1 year ago.
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 1 year 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 CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Expert:  TheDoctor replied 1 year ago.
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
Expert:  TheDoctor replied 1 year ago.
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 1 year 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.


 

Expert:  TheDoctor replied 1 year ago.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1461
Experience: M.S. in Internet Information Systems
TheDoctor and 6 other Homework Specialists are ready to help you

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3121
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3035
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/lanis/2009-4-1_233717_phput9xef_c1pm.jpg Lani S.'s Avatar

    Lani S.

    Tutor

    Satisfied Customers:

    2457
    Registered Nurse, Internet Researcher, Private Tutor
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2341
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1975
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1873
    Bachelors Degree and CPA with Accounting work experience