<?php

     

         $current_user =  wp_get_current_user();
      
            
             $wpdb->insert("wp_quiz_results", array(
              "quiz_id" =>  $qid,
             "user_id" =>  printf($current_user->ID),
             "post_id" =>  $post2,
             "points" => 1,
             "points_sum" => 1,
          )); ?>