Currently i'm using a javascript to confirm a form.
echo "<script>
var x = document.URL;
var r = confirm('Are you sure?');
if (r == true) {
window.location.search += '&answer=1';
</script>";
so it add the get param "answer", and in my php file i check the number (if answered "Cancel it returns 0), but i need to delete this param from my url after checking it, but I didn't find anything to do it.
my URL should be like this in the process.
starting url = www.myurl.com
user send the form, and answers "yes" to the question
current url = www.myurl.com?answer=1;
php check the get variable and to things if answered "yes", after finish the function it modified the url
url after php function = www.myurl.com