The changes do persist in the database. If I refresh the page the changes show.
How would I put a break point or alert in the callback?
Here is my code for the delete function...
else if( isset($_GET["pq_delete"]))
{
session_start();
$productid = $_GET["productid"];
$products = json_decode($_SESSION["products"], true);
foreach($products as $i => $product){
if($product["productid"] == $productid){
unset($products[$i]);
}
}
$sqldel = "delete from products where productid='$productid'";
$conndel = new PDO("pgsql:host=localhost;dbname=xxxxx","xxxxx","xxxxx");
$stmtdel = $conndel->prepare($sqldel);
$stmtdel->execute();
$_SESSION["products"]= json_encode($products);
echo "{\"result\": \"success\"}";
$conndel = null;
}