Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
Submit form, don't show param and value in URL?

I have a simple form and when the select field is changed it submits the form reloading the current page passing the select value to the page.

<form>
  <select id='query' name='query' onchange='this.form.submit()'>
    <option value=1>1<option>
    <option value=2>2<option>
  </select>
</form>

This works fine, but the URL then contains pagename.php?query=2 Is there anyway to do this without the parameter and value being seen in the URL ?

Thanks

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

When you use form, it has a paramatter that if you dont put nothing, it is METHOD="GET", this makes the petition and sends data from URL, so you should put METHOD="POST":

<form method="post">
  <select id='query' name='query' onchange='this.form.submit()'>
    <option value=1>1<option>
    <option value=2>2<option>
  </select>
</form>

You will have to make some more changes in your php, but i don't have enought information about it to help you.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!