Getting the username from LDAP - Can you tell me what's wrong?
<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>I deleted the line $_SERVER["REMOTE_USER"] = 'smith2';
and i did like this:     </p>

<pre><code>$fname=$ldap1-&gt;getFname($_SERVER["REMOTE_USER"]);
</code></pre>

<p>But it does not work, it displays anything. Can you tell me whats wrong?</p>

<p>Is there a simple way to do this?</p>

<p>Thanks</p>
