I am trying to create a website that will display a table based on input from an HTML form. My website has a MySQL database set up already and I am able to populate and display the table using MySQL and PHP when I hard code the query into PHP.

I'm trying to find information on how to create a webpage that will query a table based on a users search parameters without calling a new page. Is there a way to create/display a table on the same page as the HTML form? I want the user to be able to perform a search/query and have the results appear below the form in a table. Then, if they perform another search or change the parameters of the previous search, I want the same table to destroy and recreate itself below the form again.

The table is going to be accessing static data from a MySQL database. The information in the database will never change or be updated (the data are historical results from a sports league).

I already have HTML, MySQL, JavaScript and PHP built into the page, so I am a little familiar with all of them. How do I use HTML, PHP, JavaScript and MySQL to destroy and create new tables based on an HTML form without creating a new window for every search?