Select Page

So I needed to have a statement that closed out a page when success condition was met. Here is a quick snippet that worked like a charm for me.

echo “<script type=”text/javascript”>”.
“window.close();”.
“</script>”;
This is great is you are passing a bytearray data, for instance, with POST and need to close out that pesky window.