I am developing a job site, and the custumer would like the following.
On the job submit, the user will be able to set a date when the actual job will start, and in the search there are the following options for job start to select:
<option value="">Today</option>
<option value="">Tomorrow</option>
<option value="">In a week</option>
<option value="">In a month</option>
And im a bit lost at this part, i never did something like this.
Now i dont want anybody to write this for me, just give me an advice or a hint, for the logic, if its posible.
What i donr really get is, what values should i give the options, and how to get the actual reasults if there is.
Thank you
The values only need to be ones you’ll recognize when processing the request. They could be “today”, “tomorrow”, “next_week” and “next_month” if you want.
Then when handling the request, take today’s date and add:
Look at
DateTime::addfor the date arithmetic part.