I want to delete a row from table with delete button with confirmation from user but without page refreshing with help of jQuery ajax.
I know a little about php, html, javascript, jquery, and sql. I dont know how to go about doing this but what i really want to do is to be able to pull data from a sql table (i already know how to do this).
Then display the data with a button next to it (i also already know how to do). When they click the button it will remove the element that hold the visible data and also send a sql statment to delete the row in the database. A very crude code over view.
<?php
echo '<p>Data 1: '".$someDataFromDB."'<button id='deleteThisRow'></button></p>;
?>
from this I would like to:
- Click the button
- remove the paragraph element so they users know it was deleted
- then send an sql statement to delete the row from the sql table
All this without refreshing the page. Is that at all possible?