In my resources i have a parent document, and a child document in it.
I need to pass over a variable from a button or link click from the parent to the child
for example:
-parent got a value "new york", and when i press on a request element, the child page shows everybody who lives in new york.
I dont like much variables in my url, so thats why i would like a diffrent approach.
THanx for time
-
☆ A M B ☆
- 24,524 Posts
Use a form with the links or buttons as multiple submit buttons. Some creative CSS can make very nice links.
http://www.techrepublic.com/article/handling-multiple-submits-in-a-single-form-with-php/5242116
-
☆ A M B ☆
- 24,524 Posts
Exactly. The form doesn't have to have anything besides your button elements. Give each button the same name. You can even generate the button elements using a snippet to get all the possible values from your database, thus eliminating the need to edit your list if you add or remove locations. Your receiving page's snippet would get the value of the button that was used to submit the form.