I am not realy sure where to start. I have a page setup to search for members in my admin panel. I am trying to find a way to get search results without refreshing the page when clicking a button. I already have a file that searches the db which is a seperate php file. The page the search box is on is also a php file. I have spent days googling and reading posts on here with little success. All i want is a button that when clicked will search the db for the member name in the search box then populate a list on the same page without refreshing the page. any tips would be much appreciated. this is my searchbox code below.
Get search results then populate page without refresh
You should use ajax.
- Create your HTML form
- Add a
clickevent on your submit button
- Display the response
Here is an example from w3schools: