Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

173
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda