Link to home
Start Free TrialLog in
Avatar of rolandmy
rolandmyFlag for Malaysia

asked on

PHP programming

Hi experts.

I have this particular request:
Customer registers and pay via payment gateway.

I need every 5th registrant/payment to be free.

So, 1st, 2nd, 3rd, 4th, pays, 5th free of charge. And then 6th, 7th, 8th, 9th, pays, 10th is free of charge.

I just couldn't figure out the programming logic. Any sample code that I could rely on for this?
SOLUTION
Avatar of Lee Wadwell
Lee Wadwell
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rolandmy

ASKER

Didn't use.
@rolandmy: Withing less than 24 hours of posting this question, you received exactly the correct answers here.  Yet you ignored the question for months, never responded and then gave your fellow experts the worst possible grade anyone can give at EE.  I think we are entitled to an explanation.  Please read the grading guidelines and then tell us why you did that.  Thanks, ~Ray

https://www.experts-exchange.com/help/viewHelpPage.jsp?helpPageID=26
Ooops. I didn't read the guidelines. My bad. I apologize. As I didn't use the solution, I thought I'd just rate it as a C. And I didn't put it into knowledge base.

Won't happen again since I already read the guidelines as below.

An A grade should be given if you receive the solution from the Experts; you should consider the A grade the default unless it is deficient.
A B grade should be given if the solutions require you to do a good amount of extra work to resolve your problem.
A C grade is the lowest possible grade you can give. Experts should always be given the opportunity to improve it -- but that does not mean they should rewrite your entire application for you.

It is customary to explain any grade that is not an A.