complete php order form with discount code check

In Progress

This is our initial position:

- there are two simple php files: php1 for an orderform, php2 for checking and confirmation

- php1 is an order form, where the customer can put in his address before ordering.

- there is also a field for "discount code". If the customer has a discount code, he can put it herein to get a discount.

- with a submit button, the php2 is called.

- php2 checks address data for completness.

- check is done with simple "if" queries

- if the address is incomplete, it goes back to order form

- if the address is ok, order will be sent

- discount code is checked manually


This is what we need:

- php3: discount code validation and mark discount code as obsolete

- at submitting the discount code must be validated

- additional we provide a "[url removed, login to view]" file, wich is edited manually.

- this is an example of [url removed, login to view]:

12345678901234;[url removed, login to view];[url removed, login to view]

12374278901233;[url removed, login to view];[url removed, login to view]

82345678421230;[url removed, login to view];

55345685671236;[url removed, login to view];

- [url removed, login to view]:

-- format is text/csv

-- seperator is semicolon ;

-- there is no header line

-- each line is one discount code

-- three fields: fields one/two are predefined, field three is controlled by php3

-- first field is the discount code, alphanumeric, up to 20 charcaters, no spaces

-- second field:expiry date; date format: [url removed, login to view]

-- third field: date of cashing the discount; date format: [url removed, login to view]

- validating with php3:

-- validating must be processed in a separate php3 file. php2 calls the new php3 as a function. php3 returns only true/false (valid/not valid).

-- so the only change in php2 is the new function call to php3 and if the check fail and additional error message.

-- new php3 function:

--- get the customer discount code from php2 as parameter

--- read each line in the csv file and compare with predefined discount codes with our customer discount code until it finds an exact match

--- discount code is only valid if:

---- predefined discount code matches complete with customer discount code (not case sensitive)

---- predefined discount code has same length than customer discount code

---- current date is less or equal than "expiry date" (second field in line)

---- third field in line (discount code) is empty

--- if the discount code is valid:

---- change [url removed, login to view]: php3 write current date in the line with the matched discount code as third field. This mark the discount code as obsolete

---- date format: [url removed, login to view]

---- return true to the calling program as valid discount code and end php3

- leave php1 unchanged

- complete php2:

-- this should the call in php2 look like i.e.:

--- if (php3($discountcode))

--- {

--- // current code for ordering; leave unchanged

--- }

--- else {

--- // new code: error message "discount code invalid"

--- }

Skills: PHP

See more: form php discount, order form php codes, php order form code, php order code, new line in php, address is invalid, php check form complete, php less than or equal to, semicolon, discount, code check, order field, simple check date, submit data php simple, can match order, php customer form, function order, check processed, read csv file php write csv file, check compare, php function write, error submitting form, codes order, php function match data, address match php

Project ID: #3988794

Awarded to:


Hi, I can make such task. I have experience working with php and csv. Regards. Dima

$50 USD in 3 days
(63 Reviews)

22 freelancers are bidding on average $81 for this job


ready to start Thanks

$100 USD in 5 days
(130 Reviews)

I am ready and expert in PHP.

$45 USD in 1 day
(39 Reviews)

We are experts in PHP Open Source (any kind of PHP/MySQL work), Javascript Framework (Jquery) and Ajax/Web 2.0 technology. Some of the projects we completed for php are mentioned below More

$200 USD in 5 days
(57 Reviews)

Lets get it done!

$60 USD in 2 days
(115 Reviews)

Hello, I can do this today, if you choose me. Why don't you use a database like mysql or sqlite (simple file, works on any server)? Let's talk and i'll help you optimize your checkout process.

$50 USD in 1 day
(44 Reviews)

I can do it. Please check your PM. Thank you.

$88 USD in 2 days
(59 Reviews)

Hi! I can make this validation function quick & deliver high quality. Ready to start right away.

$50 USD in 1 day
(24 Reviews)

Ready to work.Check PM

$250 USD in 5 days
(5 Reviews)

hi sir! please read pm. thanks...

$60 USD in 2 days
(32 Reviews)

Master of PHP here. Easy job, can finish in few hours, check review, will not disappoint!

$68 USD in 0 days
(12 Reviews)

Please see pm

$60 USD in 0 days
(8 Reviews)

Very clear description! I will ready to make your php3. :)

$50 USD in 3 days
(24 Reviews)

Hi - I'd love to work with you on this - I would like to use jquery/ajax to validate the discount code via a call to a php function- that way the page will not need to be reloaded if the discount code is invalid (whic More

$90 USD in 5 days
(13 Reviews)

I've read all your requirements and I'm confident to say that I can help you.

$150 USD in 0 days
(4 Reviews)

Hello Hiring Manager, please visit your PMB for more details about my work ,skills and expertise. I have read your given core description of project at our best and will surely give better results.

$50 USD in 2 days
(9 Reviews)

Your instruction and thorough and clear, which I have read and understood perfectly. I am confident about being able to do this. Please See PM for my background.

$55 USD in 1 day
(1 Review)

Hi We are a web Design and Development Company from India. We have more than 12 years of Experience in the E-business Solutions. So far we have served more than 600 Clients in India. Our Team of professionals wil More

$30 USD in 2 days
(1 Review)

Sir am highly keen to complete this job within the specified deadline . Bring it on. Thanks..

$55 USD in 4 days
(2 Reviews)

SSU's core experience in Web Development, Software Development, Multimedia, Logo And 3D Animation is soo strong that it is capable of providing solutions across any industry segment. In Web Development we are doing e-C More

$100 USD in 5 days
(0 Reviews)

Experienced PHP developer here. I can do the work in mean time.

$45 USD in 2 days
(0 Reviews)