I am able to display sweet alert after the page refresh but I have to click on Ok button which I am getting on sweet alert to redirect the page.Please help me in this.
To specify a callback function, you have to use an object as the first argument, and the callback function as the second argument.
echo '';