I am using Javascript to store values in a stack, the problem is that the stack value remains active until the page is refreshed.
When the page is refreshed the value in the stack value gets set to 'Undefined'.
Is it better to implement a place to permanently store the stack values? Then even if the page is refreshed the old stack value should be able to be retrieved.
How can I implement the below stack snippet, in a PHP script?
var arr = new Array();
var pushed=arr.push(id); // for pushing into stack
arr.splice(0,arr.length); // for deleting stack
How to I refer to the PHP stored values in Javascript?