Hi i am trying to include custom taxonomy terms (hierarchical) to some page, using a form. I've got a checkbox for every terms:

<input type="checkbox" name="term1" value="$taxonomy_term_id"/> 
<label for="themes" > $term_name </label>

<input type="checkbox" name="term2" value="$taxonomy_term_id2"/> 
<label for="themes" > $term_name2 </label>

On submit i am using wordpress_set_object_terms function:


however it only produce a taxanomy term whose title is the need for $_Publish['term1'] ( in admin panel, the page as no new taxonomy term checked, the new term produced ).

Any idea?

Here it is:

   $wpdb->insert( $wpdb->prefix .'term_relationships', array('object_id'=>$post_id, 'term_taxonomy_id'=>$_POST['term'], 'term_order'=>'0'));