I want to delete value from database using PHP.
Using a table row and placed a button like "Delete" and I create a function like onClick='window.location='page.php?action=del&id=1'
and in PHP for delete.
if($_REQUEST['action'] == 'del'){
$req_id = $_REQUEST['id'];
$del_query = mysql_query("DELETE FROM table WHERE id='$req_id'");
}
It's working well but, I don't want to refresh the page. Please tell me how can I do it without page refresh?