I'm trying to use several GET parameters in a URL.
For example logout-user
and clear-cart
- is it possible to do something like:
/?clear-cart&&logout-user
What would be the correct way to do it?
I'm using WordPress.
If you don't want values for them, you just need one ampersand:
/?clear-cart&logout-user
If you want values, they get equals signs:
/?clear-cart=1&logout-user=true
Don't forget (if you are outputting these URLs) to pass their values through urlencode()
so they don't break your URLs.