Well, PHP can't open a new browser window. You need something client side, such as JavaScript.
<html><head><title>Stuff</title>
<script>
function openwin() {
window.open("newpage.htm");
}
</script>
</head>
if(!$delete) echo '<body onload="javascript:openwin()">';
else echo '<body>';
There are other things you can do with window.open, but this should get you started.