Cannot connect to LDAP server
"; } else { ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0); $bind_dn = "uid=$uid,ou=People,dc=$host"; if (@ldap_bind($ldap, $bind_dn, $password)) { $msg = "Login successful! Welcome $uid 🎉
"; } else { $msg = "Invalid credentials
"; } ldap_close($ldap); } } else { $msg = "uid=$uid,ou=People,dc=$host Please fill both fields
"; } } ?>Server: = htmlspecialchars($host) ?>
= $msg ?>