Remove products from cart using Ajax

I'm trying to remove products from cart using Ajax.
The php code in the backend is:
if (isset( $_POST['remove'] ) ) {
global $mp;

list($bid, $product_id, $variation) = split(':', $_POST['remove']);
$global_cart = $mp->get_cart_cookie(true);

unset ( $global_cart[$bid][$product_id][$variation] );


but it's not working... I've tooked this code from your "marketpress.php".

all the objects and variables are fine and with the right data, but for some reason the "unset" function have no effect.