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 8159653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:59:36+00:00 2026-06-06T17:59:36+00:00

I have an HTML page for a search operation. Once the user enters the

  • 0

I have an HTML page for a search operation.

Once the user enters the search criteria and clicks the search button, the result of the search should be displayed on the same page.

However, on the search results page, the search field values entered by the user are cleared due to refresh/redirect to the same page.

How do I capture the field values and display them?

  • 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-06-06T17:59:37+00:00Added an answer on June 6, 2026 at 5:59 pm

    The best option I think, would be to merge your search form and results page, and have your form submit to itself like so:

    <form method="get" action="">
        <input type="text" name="search" value=""/>
        <input type="submit" value="Submit"/>
    </form>
    

    this way you can still access the searched item by using the form submission your search uses, and making the value="" attribute of the search field the same value; in PHP this would be:

    <form method="get" action="">
        <input type="text" name="search" value="<?php echo $_GET["search"]; ?>"/>
        <input type="submit" value="Submit"/>
    </form>
    

    If you do still want to have an intermediate page, then use a hidden input field:

    <input type="hidden" name="searched"/>
    

    if you have users submit a form to be redirected.

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

Sidebar

Related Questions

I have to fetch html page of first search result in google. For doing
I have an html page called search.html which contains sliders, they work perfectly in
I have 2 files, main.html and search.php . Within the main.html page, there is
I have a HTML page that contains a search box containing a number of
I have my html-php web page with form, inputs and sumbit button. With html
I have an input in an HTML page <input id=SearchBox type=text value= width=300px title=Search
I have a search controller and index page: # search/index.html.erb <% @user_prices.each do |up|
I have the jstree search plugin working fine inside a HTML page. The data
I wanted to create an HTML page which would have a set search criterias.
I have HTML page where windows media player is embedded. It works very well

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.