Let's say I have a link somesite.com/?q= I want to add some values to it (via inputs) and open it in the same window on submit. So the link will look like this when it opens: somesite.com/?q=Some Job Title Some Location Some Company Name It probably should be done via a form with some javascript right? Or how would you do that? Appreciate your help!
You should not do this with client-side processing... you want to combine them to one field, do it SERVER-SIDE. You can kind-of cheat though: <label>City: <input name="q[]"></label> <label>Town: <input name="q[]"></label> <label>Zip: <input name="q[]"></label> Code (markup): Assuming PHP server-side, you could then just do: \\ assuming you checked that $_POST['q'] iss set and array first $q = implode(' ', $_POST['q']); Code (markup): It's a cute trick, if you have elements named [] PHP will treat them as a dynamic array. Again, not something you have any business screwing with using client-side scripting. Do it on the server.