How can I get a username from LDAP?
<p>I'd like to ask you how can i dinamically get a username from ldap. As you can see below, i entered the username 'smith2'</p>

<pre><code>$_SERVER["REMOTE_USER"] = 'smith2';
$param = $_SERVER["REMOTE_USER"]
</code></pre>

<p>And I can get his first name, like this:</p>

<pre><code>   $ldap1 = new ldapl;
   $fname=$ldap1-&gt;getFname($param);
</code></pre>

<p>This is useful because I have some forms with some fields which are filled by default (name, first name, etc).</p>

<p>It must be dynamic. Each person has a PC, so the person Y should see his name, first name, etc The person X his name, first name, etc.</p>

<p>But i don't know how to get the username dinamically. Can you explain it to me?</p>

<p>Thanks</p>
