Jump to content

Display User's Name After Login (Php)


thelee

Recommended Posts

hello.im creating a website.i want to show the user name after they logged in and for those who dont register i want to leave any msg. when the user login it will show welcome "the user name" but when the user dont log in,it will be a error, can someone help me.

here is the code

<?php

session_start();

echo "Welcome ".$_SESSION['MM_Username'];

 

else (isset($_SESSION['MM_Username'])) {

echo "why you dont register?";

}

?>

Link to comment
https://forums.phpfreaks.com/topic/270525-display-users-name-after-login-php/
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.