How to print/show a logged in user name into a text filed in a form using php??????????? what I want to do is, as soon as user go to the form and want to submit, there is a filed called user name, which I want to be automatically filled up from user login details... Please show me some ways how to do this?
Assuming you save the username in the session when the user logs in, you just have to do: echo htmlspecialchars($_SESSION['username']); ?> PHP: