How to include data in search box

I have included a search box in my site but my query is how do i insert data into it.

You haven’t given us much information to go on. When you say you included a search box, did you just include the html form for the search box, or did you also write the php code to process it? It would help if you provided us with all the relevant code. Right now we would just be guessing wildly.

I have just inserted it with html and css

Do you mean something like this?

<input type="text" value="" name="something" class="search" />

You mean if user type relating your topics, that will appear on search like Google search?

yes exactly vijesharora16 but i dont have any of the proper idea about how to implement it so please suggest me.

Either someone will help you from here or you can try such videos - https://www.youtube.com/watch?v=38rJPEqapoA

It would depend on how your site it structured. Is it a database driven site?
To do a search you would have to query some form of database which indexes your content.

Yes it is database driven site please suggest me query for it.

In order to help you with the query, you would need to give us more information about your database and which table / fields you want to search.

Hello there I am making a website related to job and suppose for example if you are the visitor of my website and if you are searching for jobs related to Android in the search box the all the jobs related to android should be visible to you. So give me a little bit suggestion so i can implement it on my website

I am assuming you are storing all the information about the jobs in a database table because you said it is a database-driven website. What tables do you have in your database, and what fields do each of the tables have? You need to provide us with something to work with. We are not going to do all of the work for you.

If you have never built a site like this before and have no experience with databases and querying them, you might want to take a step back and learn how to do that first.

1 Like

Hello WebMachine as you said the concept of search box if have made a table named as search in my database so as you know as i am making a website related to job so for example if the user searches for job related to android he would redirected to the page containing all the information related to android job so how come it be possible so please give me a little introduction about this please help me

What’s your background in coding, how much experience with PHP do you have?

Basically all you need to do is accept the data from your html text box, perform a query in your database table to find any job listing where the “skills required” column contains the word “android”, and list the results. In fairness, that’s quite basic PHP.

Once you have that working, then you can improve it - for example, normally you’d have a separate table to encode each skill, and another separate table to link the skills required to the job opening. But that can come afterwards.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.