Hello I have a Query running on a page right now.
Ultimately I need the Country Code(Variable) to be selectable via Drop down menu so the query runs with with the selected Country Code(Variable.)
I would also like the Country Code to remain selected even if I go to another page so the query automatically runs with the preselected variable.
Thanks
Your form should read something similar to:
To input the selected country you would need to use $_POST[]
A long winded, but fairly simple approach to ensuring the selected country remains selected would be to each option as:
I realise for individual countries this could take a long while, but it should work – your problem is needing the ‘selected=”selected”‘ expression within the opening tag of each option on the list.
This would only work if you reloaded the page from within the script – for example if you were error-checking the whole form and wanted to preserve the submitted results. If you are transitting to an entirely different page then a cookie would be one way to store the data, there are security issues and legal issues, especially in Europe, governing the use of cookies, however.