Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4005344
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:22:56+00:00 2026-05-20T08:22:56+00:00

Hi there and thanks for taking the time for this question. I’m using a

  • 0

Hi there and thanks for taking the time for this question.

I’m using a search form using jQuery for live searches. The search bar is on every page on my website and works fine. Now I want to extend it. When people hit the Enter key I want them to be redirected to the search page where they get all the results.

The only problem is that the Get Method is not working.
My form is looking like this:

<form action="search/search" id="Searchform" method="GET">
<p><input type="text" name="SearchInput" id="SearchInput" value=""  onkeyup="lookup(this.value);" /></p>
<div class="clear"></div>
<div id="suggestions"></div>
</form>

My .htaccess file contains this rewrite rule for the search page:

RewriteRule ^search/([^/]*)$ search.php?mode=$1 [L]

Evey time I hit the Enter button I get this:

search/search?SearchInput=moonwalker

And using the GET method I can’t seem to get the value of SearchInput at all.

When using the POST method everything works fine. But I read in different articles that I really should be using GET method for searches.

So my question is: Why should I use the GET method for search pages? Are there any big advantages if I just decide to use POST instead of the GET method?

I know I can use redirects etc to accomplish this with the GET method, but I just want to know why POST is considered bad practice in search forms.

Thanks in advance for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:22:57+00:00Added an answer on May 20, 2026 at 8:22 am

    You need to re-append the query string:

    RewriteRule ^search/([^/]*)$ search.php?mode=$1 [L,QSA]
    

    The QSA above does the magic. Otherwise, everything in the URL after the ? is truncated and replaced by the new query string ?mode=foo.

    To answer the question: It is good practice for several reasons to do non-transforming queries with GET (everything that just creates a view) and changing requests (like, posting a comment or a new product) with POST. Eric Petroelje gives some reasons in his answer. Some others can be found, when you google for REST + GET + POST. (This leads, e.g., to this SO question)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Thanks for taking time to read this question. I am designing a 3-tier solution
I know this is simple question but taking more time How to find first
and thanks for taking the time to read my question. We will have visitors
thanks in advance for taking the time to read through my question... /* Binary
Thanks for taking the time to read my question. I am looking for advice
Thanks for taking the time to read... here is my question/scenario, its a quick
Thanks to everyone out there helping newbies like me. So far I have this:
Is there a way in Android to get the upcoming alarm time? Thanks Clarification:
Still learning WPF....thanks for any help. Is there any way to Refactor this: <ListBox
Thank you for taking the time to read this. I looked over Stack Overflow

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.