I'm learning to use mysqli and AJAX and building a simple application using AJAX to insert data into a database and display data in a table from the database. The table should display current information at the time that the webpage is loaded and then update anytime a record is added to the database using the HTML form. I'm having a couple ofissues.
- Thus far, the form works from my main HTML file, except that it leaves the page and opens addActorInfo.php, instead of just refreshing the main page.
- I have the table working when I open the getActorInfo.php file in a browser, but it is not being pulled into the main page.
Any suggestions would be appreciated.
EDIT INFORMATION: I solved problem number 1 and have updated the HTML code to reflect changes. Currently, I believe I have a bug somewhere in my drawTable() function that is preventing the table produced by the PHP GET FILE from being returned back to the main page. I've tried using the statement "document.getElementById("actor_display").innerHTML=xmlhttp.responseText;", but it's still not showing up.
Main HTML
mysql(i)entirely and use PDO