I have two JS variables I want to use them as php variables and store them in the database.
Here is sample
var apiKey = 'apikey';
var pageToken = '';
var numOfResult = 0;
var maxResults = 200;
function searchVideo(){
   var separator = ",";
   $.getJSON('https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=50&pageToken=' + pageToken + '&playlistId=PLrEnWoR732-BHrPp_Pm8_VleD68f9s14-&key=apikey&callback=?',function(data){
        var l = data.items.length;
        pageToken = data.nextPageToken;
        numOfResult += l;
        var itemUrl = '';
        for(var i = 0; i < l; i++) {
                if( i == 0) {
                        separator = ',';
                }
                else {
                        separator = ',';
                }
                var videoid = data.items[i].snippet.resourceId.videoId;
                var title = data.items[i].snippet.title;
                console.log(videoid);
        }
        if( numOfResult < maxResults) {
                searchVideo();
        }
    });
}
How can I store variables title and videoid into the database using php mysql
 
     
    