I am building a huge filter of sorts it works great but I have decided to put a form at the top of the page i need to form to maintain the current GET url but only change the part it is filtering.... is this even possible?
You could use javascript replace() but you still need a fallback anyway so you can use POST method for forms, with the action being the URL with the original query string. Than add a check for a POST and add an immediate redirect (location header). To form the new URL, loop over $_POST and change the $_GET variables as required, then form a query string from the $_GET array.
ok that makes sense however what about multiple selection i can't pass multiple GET variables i can take a POST array and inject it into my sql for my query but without using the get variable i loose my sorting
Sorry, do not understand? You do know about GET arrays right? ?test[]=1&test[]=2 Or were you talking about something completely different?
no i did not know that....please point me in the right direction please keep this in mind.... i am having to use GET to keep my sorting with pagination straight as I am sorting with PHP and not javascript so whatever i put in the URL of my site i need to also be able to hardcode into my sort.... GET arrays that i didn't think about
Yeah, you could easily get values from the $_GET array in order to restore the sorting. I've done this before but I think javascript sorting is way much faster, without headaches and preserves bandwidth too
i am trying to think of a way to automate it right now i am just imploding the GET arrays into a string