How do i format a URL to set date search to today's date?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
missinglina
User
Posts: 25

How do i format a URL to set date search to today's date?

Post by missinglina »

Hi. Is there a way to create and store/bookmark a URL so that it queries my php page with the current date?
For example, my URL currently contains this in the middle of it:
x_PO_TxnDate=06%2F01%2F2016&z_PO_TxnDate=>

for a field called "PO_TxnDate". It's set to search for data where this date is>=06/01/2016.
How can I format the URL so that it looks for data where this date is today's date?

I think a better way to ask the question is: is there something I can type into a date field (where my date format is set to mm/dd/YYYY) so that when click on search, the php submits today's date in the mysql query. If I knew the answer to this, the I would imagine that the URL would format itself(?)


arbei
User
Posts: 9360

Post by arbei »

You can enable the option "Requires search criteria" in [Table] -> [List Page] to make sure the user to enter the search value and enable the option "Ext. Search" for the date field.

Then use "ew_CurrentDate()" as the default value of Advanced Search Page in order to show the today's value as the default search value.


missinglina
User
Posts: 25

Post by missinglina »

Thank you very much for this. I can't wait to try it! Will report back soon.


Post Reply