Left Quote    It is possible to store the mind with a million facts and still be entirely uneducated.
- Alec Bourne    
Right Quote
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply

        Viewing Topic: How to call username?
  This user is online  Guest
  Subject: "How to call username?" Posted: @ 9:15 am on Dec 09 2005   
I'm new to working with mysql and sessions and was just wondering how I would go about recalling the username of the currently logged in user? I've tried

session_start() ;
$usern = $_SESSION['user name'];
echo("$use rn";

But that didn't seem to work. Can you pleasse help.

    Viewed: 6,191 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: How to call username?" Posted: @ 4:55 pm on Dec 09 2005    

Member #: 1
Rank: Admin. - (1,510)
Since: 02/06/05
Posts: 604
From: USA

that would be fine, but before that you need to make sure that the username is stored in the session ($_SESSION['us ername']).

See this part of the tutorial: Complete Members System: Applying Session Variables

-bs0d |

    Viewed: 6,183 Times | Reply to This | To top
Viewing Page: 1 of 1

1 |

You must be logged in to post on the forums. Login or Register

"" Copyright © 2002-2021; All rights lefted, all lefts righted.
Privacy Policy