Forum Moderators: coopster
2. a php page that checks the valid user name and if valid user sets a session vaiable and redirects to next page msg.php
<?php
if ($_POST['uname']=="Mad"){
session_start();
$_SESSION["uname"] =$_POST['uname'];
header('Location: msg.php');
}
else{
header('Location: login.html');
}
?>
3. and here is the third page msg.php where i am trying to print the value stored in the $_SESSION variable
<?php
echo "Hello Mr/Mrs ".$_SESSION['uname'];
?>
I cant make out whats wrong with this code..can any one help me out