Re: session_destroy causes backspace on IE
| From: | Eugene Lee | Date: | Fri, 24 Oct 2003 19:21:58 +0000 |
| Subject: | Re: session_destroy causes backspace on IE | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-167480@lists.php.net to get a copy of this message | ||
On Fri, Oct 24, 2003 at 01:24:32PM -0400, bill wrote:
:
: The following code causes IE to break the </h1> tag.
:
: <?php
: session_start();
: header("Cache-control: private");
: echo "<html>
: <head><title>logout</title>
: </head>
: <body>
: <h1 align=\"center\">Logout page</h1>";
: $_SESSION = array();
: session_destroy();
: echo "<p>Session destroyed</p>\n";
: echo "</body>
: </html>\n";
: ?>
:
: View/Source in IE: displays this (note </h1> broken):
:
: <html>
: <head><title>logout</title>
: </head>
: <body>
: <h1 align="center">Logout page</<p>Session destroyed</p>
: </body>
: </html>
: h1>
:
: Details: Works fine in other browsers I've tried, and this version of IE
: (5.5) does -not- have cookies enabled.
Besides tossing out IE? :-)
Try splitting your big echo() statement into smaller pieces and see what
happens.
echo '<html>'."\n";
echo '<head><title>logout</title>'."\n";
echo '</head>'."\n";
echo '<body>'."\n";
echo '<h1 align="center">Logout page</h1>'."\n";