getMessage()); } if ($ldapconn) { $ldapbind = @ldap_bind($ldapconn, "uid=" . ldap_escape($id) . ',' . $ini["basedn"], $_POST['password']); if ($ldapbind) { $_SESSION['user'] = $id; header('Location: home.php'); exit(); } else { $_SESSION['message'] = "Wrong username or password"; header('Location: signin.php'); exit(); } }