How to launch PHP script using JS?
Hello. I am working on a complex project and I hit a problem. Pretend that I have a webpage with table that is generated by PHP script and contains data from database. This table has exactly same columns as the table in SQL database plus there is one extra column with delete button for each row. What I want to do is to remove the deleted row from the webpage (DOM) using JavaScript and then delete the row from the database using PHP after clicking the delete button in the row. My plan: 1) Clicking the button 2) Getting inner HTML of the first column (contains ID of the row) into a variable 3) Using JS to delete the <tr> element from the table 4) Launch my PHP function and pass the variable containing row's ID into it 5) Delete the row whith id stored in the variable from the database using PHP I can do all of the points above EXPECT the point 4). Can you tell me how can I do it?