Pass php variables with window.location

I have the following function:

$("#photo-details").on("submit", function(e) {;
    e.preventDefault();
    $.ajax({
        url : "/shop/add_product",
        type: "post", 
        data: $(this).serialize(),
        success: function(data) {
            $("#bericht").html(data);
            $("#bericht").dialog( "option", "buttons", [{
                 text: "Close",
                 click: function() {
                     window.location = '/shop/cart';
                 }
             }]);
             $("#bericht").dialog("open");
        }
    });
});

I need to pass the value from two hidden fields to /shop/cart but not as part of the URL. How should I do that.

Thank you in advance

you could save them in a cookie or in the Web Storage.

Hi Dormilich. Thank you for the reply. Can you explain what you mean Web Storage?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.