note 32600 added to function.trim

From: Date: Mon, 02 Jun 2003 15:42:56 +0000
Subject: note 32600 added to function.trim
Groups: php.notes 
Request: Send a blank email to php-notes+get-49570@lists.php.net to get a copy of this message
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 ---- Manual Page -- http://www.php.net/manual/en/function.trim.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32600 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32600&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32600&report=yes

« previous php.notes (#49570) next »