So I have a table that pulls data from a DB and I'm trying to add a Remove/Delete button but it's not working and I can't really work out why.
JS Code
$(document).on('click', '.removeIteam', function (event) {
var $iteamID = $(this).find('span').text();
$.ajax({
type: "POST",
url: "removeIteam.php",
data: { BoxID: $iteamID }
}).done(function( msg ) {
alert( "Data Saved: " + msg );
});
});
PHP Code
<?php
require_once('connent.php');
function abc($BoxID){
$sql = 'DELETE FROM client_info WHERE BoxID=$BoxID';
$retval = mysql_query( $sql, $conn );
}
?>