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

  • Home
  • SEARCH
  • 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 8161185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:26:39+00:00 2026-06-06T18:26:39+00:00

You guys probably don’t understand my question, I’ll try to explain further. I have

  • 0

You guys probably don’t understand my question, I’ll try to explain further.

I have a site that displays the product information its name, id, price, quantity etc.
Now I have displayed it in a way of using $_GET variable.

Like for example if I want to click the product page then the link would be

http://localhost/InventorySystem/Employee/Tools/?Item=ProductList

I dont have to make another php page for that all I need is a get method and it will display the product information.

Now my problem is, How to I implement a search function with it? Is there a way for me to create a search function like

?Item=ProductList&Search=SearchTerm

I having a hard time how to do it. Please any advices.

  • 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-06T18:26:40+00:00Added an answer on June 6, 2026 at 6:26 pm

    basically add another variable in your query string, like you just showed in your example: ?Item=ProductList&Search=SearchTerm. and just do $_GET['Search'] to get the value, pass it to your mysql and implement a filter using the WHERE clause compounded with LIKE like so:

    $searchkey = $_GET['Search'];
    $result = mysql_query("SELECT * FROM table WHERE column LIKE '%".$searchkey."%'");
    

    This will return results containing the term you passed in $searchkey, e.g. if $searchkey = "ball" then volleyball, basketball, baller, basketballvolley are all valid matches.

    EDIT:

    Your html form should look something like this to be able to pass your required params in your query string:

    <form method="GET">
    <input type="hidden" name="Item" value="ProductList" />
    Search: <input type="text" name="Search" />
    <input type="submit" value="submit" />
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

guys. I have a strange problem. I try to write unit-tests to web-app. I
Edit: I should have probably mentioned that I am extremely new to Java programming.
Probably an easy question for you guys, but its my first attempt at creating
hey guys, probably simple question for the most of you. I can't figure out
If I have a method that hides a button, I would probably call it
Guys I have an activity which has a home button, when the button is
I have a quick question for you all. I'm trying to convert over some
I have a parameter for a method, that should be a string and I
This is probably a very easy question to answer, but for the life of
Background I have a custom authentication back end for our django applications that refers

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.