Get wp_current_user_id using PHP and MySQL

Thanks to @Samuel Elh I manage to get this done.

I added this to my order-confirmation.php after I included config.php

    require ('../wp-blog-header.php');

    global $wpdb;

    global $current_user;
    get_currentuserinfo();

    $skrivID = $current_user->ID;

Then the insert query, I added the table I wanted the user ID stored in and used the variable $skrivID as value.

        $sql = mysqli_query($db_conn, "
        INSERT INTO ordre(
            userID,
            user_fname,
            user_lname,
            user_address, 
            user_email,
            user_phone, 
            service_chosen,
            user_note,
            order_date,
            statusID
        )
        VALUES(
            '".$skrivID."',
            '".$_POST['user_fname']."',
            '".$_POST['user_lname']."',
            '".$_POST['user_address']."',
            '".$_POST['user_email']."',
            '".$_POST['user_phone']."',
            '".$_POST['service_chosen']."',
            '".$_POST['user_note']."',
            '".date('Y-m-d')."',
            '1' 
        )
    ");

Ran the form with two different users and voila

http://dump.no/files/b007c7cd4c6e/2016-05-19_10_28_18-frigg.hiof.no___localhost___interaktiv_v1631___ordre___phpMyAdmin_2.9.1.1.jpg

Thanks again Samuel!