fbpx

PHP Test Instructions

PHP Test

Hi,

Below is the short PHP Test we discussed.

Please note that this is a timed test, so you need to do it all in the same day.

Send them to alon@codereliable.com

Good Luck.

Please note: do not use any PHP frameworks for this test. When you finish please send me the files & DB dump.  Also if you can send me  a URL of where I can see the files live that would be great (not necessary, but helpful)

Please note that this is a timed test, so it must be completed all at once, not over a few days.

Part 1 (Web Forms)

Create multi page checkout process with the following information:

  • On the first page ask the user for:
    • First Name
    • Last Name
    • Address
    • City
    • State
    • Phone
    • Email
  • On the second page ask the user for:
    • Card Type
    • Card Number
    • Expiration Date
    • Verification Code (CVV2)
  • On the third page display all the information

Part 2 (MySql)

Modify the code in part 1 so that it saves the data into a database. The create statements below describe the database schema:

CREATE TABLE IF NOT EXISTS `payment_details` (

  `id` mediumint(10) NOT NULL AUTO_INCREMENT,

  `card_type` tinyint(1) NOT NULL,

  `card_number` varchar(50) NOT NULL,

  `card_exp_date` varchar(50) NOT NULL,

  PRIMARY KEY (`id`)

);

CREATE TABLE IF NOT EXISTS `customer_details` (

  `id` mediumint(10) NOT NULL AUTO_INCREMENT,

  `first_name` char(25) NOT NULL,

  `last_name` char(25) NOT NULL,

  `address` char(100) NOT NULL,

  `city` char(50) NOT NULL,

  `state` char(2) NOT NULL,

  `phone` int(10) NOT NULL,

  `email` varchar(100) NOT NULL,

  PRIMARY KEY (`id`)

);

Final Notes

When getting the files back to us at the end of the test, put in the email a description of the approach you took, why you chose that approach, and what (if anything) you would have done differently given more time.