note 32600 deleted from function.trim by hholzgra
| From: | hholzgra@php.net | Date: | Thu, 02 Aug 2012 12:20:07 +0000 |
| Subject: | note 32600 deleted from function.trim by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189629@lists.php.net to get a copy of this message | ||
Note Submitter: olivierdsm at hotmail dot com
----
I just wanted to say that when you want to do a LDAP query based on a form value (i mean something
like : <form method="POST" action="script_createnewticket.php"
name="demande2">) dynamicaly updated from a popup javascript , (for example <a
onclick="
opener.document.forms['demande2'].elements['thename3'].value='my
name') it doesn't work.
It took me 2 days to find out that when you use trim, to "convert" the value, then it
works.
-------------------------
$thename4=trim($thename3);
$ds=ldap_connect("$myldapserver"); // connects to the LDAP SERVER
if (!($ds = ldap_connect("$myldapserver") ) ) {
die ("Could not connect to LDAP server");
}
$r=ldap_bind($ds, "cn=".$NTusername, $NTpassword);
$sr = ldap_search($ds, ' ', "uid=".$thename4);
$info = ldap_get_entries($ds, $sr);
-------------------------------------
only on this case you will get results.
Strange and good to know