Refresh page after form action

Searching around and not being able to implement the action through init hook I’ve found this workaround which for sure isn’t the best but does the job nicely.

echo "<script type="text/javascript">
        window.location=document.location.href;
        </script>";

at the end of $_POST instructions.
If somebody has a better solution, welcome to share.

Leave a Comment