Jump to content

SESSION PROBLEM


CorfuVBProgrammer

Recommended Posts

Hello all . . .

I have PHP Session problem in my PC.

My Computer :

Windows XP with SP2
IIS Web Server
PHP 5.2

The Problem :

I have create to web pages :

PAGE1 -> index.php
------------------------------------------------------------------------
<?php
session_register();

$_SESSION['name'] = "Merianos Nikos";
?>
<html>
<head>
<title>
</title>
</head>

<body>
<?php
echo $_SESSION['name'];
?>
<a href="index2.php">Click Me[/url]
</body>
</html>
------------------------------------------------------------------------


PAGE2 ->  index2.php
------------------------------------------------------------------------
<?php
session_register();

echo $_SESSION['name'];
?>
<html>
<head>
<title>
</title>
</head>

<body>
</body>
</html>
------------------------------------------------------------------------

When i start the index.php page it work correctly and the result is the following

------------------------------------------------------------------------

Merianos Nikos Click Me

------------------------------------------------------------------------

Then if i click on the Click Me to go on the index2.php

the result is the following


------------------------------------------------------------------------

PHP Notice: Undefined variable: _SESSION in C:\Inetpub\wwwroot\PHP_TEST\index2.php on line 4

------------------------------------------------------------------------


So what can i do for ? ? ?

I have try many many thinks and still i have the same problem.

Also i have try to use session_start() instead of session_register() and nothing thange . . .

Please i need help . . .

Thanks a lot
Link to comment
https://forums.phpfreaks.com/topic/30617-session-problem/
Share on other sites

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.