title: OpenLDAP PHP Add birthdate attribute
body: <p>I'm trying to add Date of birth attribute from naturalPerson schema in PHP, but i get the error: <code>21, invalid syntax.</code> 
  What am i doing wrong? </p>
  
  <pre><code>$addToGroup['objectclass'][2] = "inetOrgPerson";
  $addToGroup['objectclass'][3] = "naturalPerson";
  $addToGroup['dateofbirth'] =  "2020-01-01";
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p>Edit according to feedback in the comments:</p>
  
  <pre><code>Warning: ldap_add(): Add: Undefined attribute
  Line: 54
  </code></pre>
  
  <p>Full code: </p>
  
  <pre><code>$addToGroup['cn'] = $email;
  $addToGroup['givenname'] = $first_name;
  $addToGroup['sn'] = $last_name;
  $addToGroup['street'] = $street_name;
  $addToGroup['postalCode'] = $postal_code;
  $addToGroup['telephonenumber'] = $phone;
  $addToGroup['userpassword'] = $password_hash;
  $addToGroup['birthdate'] = "20200101";
  $addToGroup['objectclass'][0] = "top";
  $addToGroup['objectclass'][1] = "person";
  $addToGroup['objectclass'][2] = "inetOrgPerson";
  $addToGroup['objectclass'][3]= "naturalPerson";
  
  // Add user to selected group
  $addToGroupQuery = "cn=$email,dc=ritsemabank,dc=local";
  
  
   LINE 54: $add = ldap_add($ldapconn, "cn=$email,cn=klanten,dc=ritsemabank,dc=local", $addToGroup);
  </code></pre>
  
  <p>I get the error after adding these 2 lines of code:</p>
  
  <pre><code>$addToGroup['objectclass'][2] = "inetOrgPerson";
  $addToGroup['objectclass'][3] = "naturalPerson";
  $addToGroup['dateofbirth'] =  "2020-01-01";
  </code></pre>
  
  <p>I am trying to use this link: <a href="https://ldapwiki.com/wiki/Date%20Of%20Birth" rel="nofollow noreferrer">https://ldapwiki.com/wiki/Date%20Of%20Birth</a> to add dateofbirth attribute to the user i want to create.</p>
  
  <p>I hope that this code provides the information needed to fix my problem.</p>