Search
Left Quote    Knowledge speaks, but wisdom listens.
- Jimi Hendrix    
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   
Unregistered
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
Code:

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


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

    Viewed: 4,524 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,505)
Since: 02/06/05
Posts: 600
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 | AllSyntax.com

    Viewed: 4,516 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








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank