I have a file where the variable user has a value. now i want to use sessions to pass the content of user to another file to echo it there. I don't know why but it fails. Now here the 2 files (test.php and test2.php):
test.php :
<?
session_start();
$user = "ali";
session_register("user");
?>
<head>
<title>Untitled</title>
</head>
<body>
<a href="test2.php?<?=sid?>">Give me user</a>
</body>
test2.php:
<?
echo $user ;
?>
would be glad if someone could tell me what i am doing wrong.
Thanks in advance
ali