getting username when logged in

A

Anonymous

Guest
okay I would like to know
when a User is signed in and they enter a form, how will their username be entered without using a textarea for Username
 
The same way you know which user is logged in, I suppose.
 
Suppose u have a textbox on login page name='txtusername'.
so u write.
at welcome page that
:
$username=$_POST('txtusername');

now u can pass that $username variable page to page.
or the best way is to create session for that username. when u want to display it display by Session ID.
Ok.
 
a random session_id is automatically created when you make the session_start() call.
 
is there anything else that I have to write after that like

Code:
$_POST['User']
$_POST['pass']

and how to activate the cookie
 
Back
Top