What PHP libraries would you recommend to implement the following:
Essentially, I'd like to create an XML database and wire up a form that allows the user to select three different dependent parameters:
Even though I would like to use PHP and XML, the general problem is:
The solution must be efficient, simple, reliable, and cross-browser.
What technologies would you recommend to solve the problem?
Thank you!
I'd say jQuery and the Autocomplete plugin .
autocomplete()
result
event of the dropdowns, storing the selected option. DOMDocument
and DOMXPath
to get the data, the autocomplete plugin has built-in client side caching do ease load on the server Vanilla php and a good JavaScript framework is all you'd need.
You'll need to build a php script to generate filtered lists of districts and stations based on the provided parent filter (pushing out the data as either xml or json). The php will need to parse the xml data and filter the list based on criteria (obviously a db will handle this better than manually parsing xml)
Then use a js framework to query the php files every time the parent list's value changes. A js framework isn't required (and actually cause some bloat), however it'll make developing the app an easy task.
Personally I'd recommend jQuery due to the easy learning curve, but any popular js framework will yield the same result.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.