Welcome to Dream.In.Code
Become a PHP Expert!

Join 150,019 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,490 people online right now. Registration is fast and FREE... Join Now!




Session Question

 
Reply to this topicStart new topic

Session Question

grimpirate
28 Nov, 2006 - 11:18 PM
Post #1

D.I.C Head
Group Icon

Joined: 3 Aug, 2006
Posts: 226



Thanked: 6 times
Dream Kudos: 375
My Contributions
Here's an example which I tested on my home computer (which works) and on my webserver (which fails).

test1.php
CODE
<?php
session_start();
$_SESSION['test'] = 'haha';
?>
<html>
<head>
<meta http-equiv="refresh" content="1;test2.php">
</head>
<body>
</body>
</html>

test2.php
CODE
<?php
session_start();
?>
<html>
<head>
</head>
<body>
<?php
if(IsSet($_SESSION['test'])){
    echo 'SET';
}
?>
</body>
</html>

The string SET is not echoed onto the browser in test2.php on my web browser.
User is offlineProfile CardPM
+Quote Post

Trogdor
RE: Session Question
29 Nov, 2006 - 04:17 AM
Post #2

D.I.C Addict
Group Icon

Joined: 6 Oct, 2006
Posts: 549



Thanked: 4 times
Dream Kudos: 125
My Contributions
What is the PHP version on the webserver?
User is offlineProfile CardPM
+Quote Post

grimpirate
RE: Session Question
29 Nov, 2006 - 03:39 PM
Post #3

D.I.C Head
Group Icon

Joined: 3 Aug, 2006
Posts: 226



Thanked: 6 times
Dream Kudos: 375
My Contributions
It's PHP 4, but no worries I managed a workaround for the problem. Thx anyways Trogdor.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 09:14PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month