My first php file is basic.php
<?php
session_start();
?>
<html>
<body>
<a href="basic2.php? name=qadeerhussain"> click on it</a>
<?php
$_session['username']="qadeerhussain";
print $_session['username'];
?>
</body>
</html>
Out put of basic.php is: click on it qadeerhussain my second basic2.php page is
<?php
session_start();
?>
<html>
<body>
<?php
print $_SESSION['username'];
?>
</body>
</html>
but it give me the following exception:
Notice: Undefined index: username in C:\wamp\www\test\basic2.php on line 12
$_sessionis not$_SESSION.