Jump to content

Conection reset when posting


SharkBait

Recommended Posts

Oh I guess I can, but the bit of post that I want posted, is resetting my connection...

Ok on one of my scripts I set the session at the top of the script and then I use javascript to display it at the very bottom of the script, but the bottom alert I use to display the session variable seems to be null where at the top it is not.

At the top:

[code]
<?php
if(isset($_POST['type'])) {
$_SESSION['myLastSearch'] = $_POST['type'];
echo "<script type=\"text/javascript\">alert('TYPE: {$_SESSION['myLastSearch']}');</script>";
}

require("includes/header.html");

?>
[/code]


At the bottom of the script

[code]
<?php
echo "<script type=\"text/javascript\">alert('TYPE: {$_SESSION['myLastSearch']}');</script>";

require("includes/footer.html");
?>
[/code]

There are no lines that set $_SESSION['myLastSearch'] anywhere else in the script so I don't know why the bottom is not displaying what the top is.

I'm at a loss :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.