Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Display user's name after login (PHP)

Date: Fri, 9 Nov 2012 16:48:39 -0800 (PST)
From: thelee <thelee_1...@yahoo.com>
To: cake-php@googlegroups.com
Message-Id: <68861406-3082-47b7-bb79-08217a629c71@googlegroups.com>
Subject: Display user's name after login (PHP)
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_962_4165742.1352508519843"

------=_Part_962_4165742.1352508519843
Content-Type: multipart/alternative; 
	boundary="----=_Part_963_19092492.1352508519843"

------=_Part_963_19092492.1352508519843
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit



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?";
} 
?>

------=_Part_963_19092492.1352508519843
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<p style=3D"margin-bottom: 15px; color: rgb(51, 51, 51); font-family: Helve=
tica, arial, freesans, clean, sans-serif; line-height: 20px; background-col=
or: rgb(251, 251, 251);">hello.im creating a website.i want to show the use=
r 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.</p><p style=
=3D"margin-top: 15px; margin-bottom: 15px; color: rgb(51, 51, 51); font-fam=
ily: Helvetica, arial, freesans, clean, sans-serif; line-height: 20px; back=
ground-color: rgb(251, 251, 251);">here is the code</p><p style=3D"margin-t=
op: 15px; margin-bottom: 15px; color: rgb(51, 51, 51); font-family: Helveti=
ca, arial, freesans, clean, sans-serif; line-height: 20px; background-color=
: rgb(251, 251, 251);">&lt;?php<br>session_start();</p><p style=3D"margin-t=
op: 15px; color: rgb(51, 51, 51); font-family: Helvetica, arial, freesans, =
clean, sans-serif; line-height: 20px; background-color: rgb(251, 251, 251);=
 margin-bottom: 0px !important;">echo "Welcome ".$_SESSION['MM_Username'];<=
br><br>else (isset($_SESSION['MM_Username'])) {&nbsp;<br>echo "why you dont=
 register?";<br>}&nbsp;<br>?&gt;</p>
------=_Part_963_19092492.1352508519843--

------=_Part_962_4165742.1352508519843--