Check the attachment for complete file.. There is problem in posting reply <?php session_start(); ?> //start session After $Count.. if($count==1){ // Register $myusername, $mypassword and redirect to file "login_success.php" foreach($row=mysql_fetch_array($result)){ $_SESSION["empName"] = $row[name]; } $_SESSION["empID"] = $id; $_SESSION["empPass"] =$pass; NOW IN empHome.php file, you can display name: if(isset($_SESSION["empName"])) echo "welcome: ". $_SESSION["empName"] ;