DEV Community

AI E8
AI E8

Posted on

3

PHP MYSQL URL Filtering

Hi everyone.
I have a database that I would like the user to be able to filter using a drop down which will then take the user to a new page with the filtered parameters carried on the URL. Example:

Database contains 3 columns (Spain, France, Germany), rows are cities such as:
For Spain: Madrid, Barcelona
For France: Paris, Marseille
For German: Berlin, Koln

I would like that when the user picks using a drop-down: Spain and France, they will be taken to a URL such as: www.example.com/country=france&country=spain
in that link they will see only France and Spain and their city in a table.
So total will be 3 elements: (mysql database, page1 with drop down list, page2 with table with the filtered data).
Can anyone help with this? Thank you so much!!!

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Instrument, monitor, fix: a hands-on debugging session

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️