How to add multiple taxonomy terms to node? I'm new to PHP and Drupal module development.
I'm having a site on which the users can create their own posts(nodes).

Can someone help me with how to save multiple taxonomy terms to a node. The users are filing their post in a form and the data is sent back through ajax. For example the taxonomy terms are sent to the server in this format: apple, banana, orange.
I don't know how to save all these terms to a node.
First of all, be sure that the taxonomy reference field exist in manage field page of your content type, then you can attach that field to your node via the function field_attach_update, before attaching that field to node let's get it from your data passed through Ajax :

 $terms = $form_state['values']['your_tax_field'];

 // attach to node :
 $node = new stdClass();
 $node-&gt;nid = $nid // Make sure that the nid exist;
 $node-&gt;type = 'your_content_type';
 $node-&gt;your_tax_field = $terms;
 field_attach_update('node', $node);
 entity_get_controller('node')-&gt;resetCache(array($node-&gt;nid));


Not tested but should work like that! You can use devel module to debug your data passed in the form.