php - Append selected value in the middle of a URL -


Any idea how would I add the URL to the place where it says is VALUE? I'm not sure how this is even more possible:

  & lt; Form method = "get" action = "& lt; php echo site_url () ;? & gt; / discover /? Search_query = & amp; orderby = empty & tax_category = VALUEHERE & amp; wpas = 1" & gt; & Lt; Fieldset & gt; & Lt; Select name = "" & gt; & Lt; Option value = "" & gt; All categories & lt; / Options & gt; & Lt; Option value = "college-student" & gt; College students & lt; / Options & gt; & Lt; / Select & gt; & Lt; Button type = "submit" & gt; Search & lt; / Button & gt; & Lt; / Fieldset & gt; & Lt; / Form & gt;    

jQuery usage:

  var url = $ ("Form") attr ("action"). // Get URL; Url = url.replace ("VALUEHERE", $ ("Choose Form"). Val ()); Warning (url); // Your final URL    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -