I have an Email form,
And i want the Username of the logged in person inserts automatically in the hidden input field.
So what i did:
On the page where the mailform is, i include Functions.inc.php
And the value of the hidden input is set on <? echo= $user_name ?>
Then, nothing gets there when i check it.
What i need to do?
Please post the code that you have.
You don't need to include include/functions.inc.php, it's always included. However, the variable $user_name doesn't exist as you already noticed.
Instead, use $USER_DATA['user_name']. If that also doesn't work, add
global $USER_DATA;
somewhere above.
This is a useless thread since the code was excluded and is of no help to anyone???
Might have actually been of help to others ???
There hasn't been excluded anything from the thread. However, I think my post explains exactly how to get the current user's name.