Reply to Re: Session variables and IE7

Your name:

Reply:


Posted by Erwin Moller on 09/06/07 10:34

bulldog8@lycos.com wrote:

Hi Bulldog,

> I have a web page set up for doctors to request vacation. All was
> working well until they upgrade their home PCs to IE7, at which time
> the variables lose their values when they click submit.

'the variables' refers to the ones in $_SESSION ?


We've allowed
> cookies from this site and allowed JS to run in an attempt to fix the
> issue, but no luck.
>
> I use a javascript calendar and additional javascript to make sure the
> end date > start date.
>
> The user can still use the calendar tool to select dates and the js
> still correctly ensures the end date and num of days requested fields
> are populated correctly, so I am looking at my PHP code first.
>
> Is there some error in my handling of session variables?
>
> PHP code:
>
> <?php
>
> /**
> * request.php
> *
> * Sends an email containing a vacation request and posts to database.
> *
> */
>
> session_start();
>
> //Let's see if they want to go to another page first
> if (strlen($btn) > 0) {

????
Are you relying on register globals ancient wrong settings in php.ini?
This code needs to be fixed IMHO.

<snipped a few pages of code>

Bulldog, you better start with a very simple page that uses a sessions,
and a followup page that tries to read the session.
That will learn you what is wrong without the complications of the old
(bad) script.

page1.php
<?php
session_start();
$_SESSION["test"] = "Testing";
?>
<html>
<head><title>testing</title></head>
<body>
<a href="page2.php">Session set, go to page2 to check its value</a>
</body>
</html>

page2.php
<?php
session_start();
?>
<html>
<head><title>testing</title></head>
<body>
SESSION CONTAINS:
<br>
<pre>
<?php print_r($_SESSION); ?>
<hr>
POST CONTAINS:
<br>
<pre>
<?php print_r($_POST); ?>
<hr>
GET CONTAINS:
<br>
<pre>
<?php print_r($_GET); ?>
<hr>
COOKIE CONTAINS:
<br>
<pre>
<?php print_r($_COOKIE); ?>
<hr>

</body>
</html>



Try something simple as this first, and see what happens.

Regards,
Erwin Moller

PS: Please fix the register globals thingy....
http://nl3.php.net/register_globals

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация