dc_jt Posted January 7, 2010 Share Posted January 7, 2010 Hi Ive got a form which has a "Years" and a "Months" field where a user enters the number of years and months they have been at their residential address. However, the form must have at least 3 years record of their residential history, therefore they can add multiple addresses. What I need to work out is when they get to the 3 years. To do this, would I turn the years into months i.e 1 = 12, 2 = 24 etc and add this to the number of months? Then work out if this total is equal to or greater than 36 (3 years)? Is this the best way to do it or is there a better alternative? Also, how would I represent this in PHP? Thanks! Quote Link to comment Share on other sites More sharing options...
cags Posted January 7, 2010 Share Posted January 7, 2010 The method you suggest seems as good as any. How you would represent it in PHP would be very much dependent on what code you currently have and how you are representing the data. Quote Link to comment Share on other sites More sharing options...
Deoctor Posted January 7, 2010 Share Posted January 7, 2010 i think wt ever u are thinking is the right one Quote Link to comment Share on other sites More sharing options...
dc_jt Posted January 7, 2010 Author Share Posted January 7, 2010 Thanks for your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.