Hi guys,
I am trying to figure out how to pass PHP ID (page.php?id= 'id' ") with ajax request.
Getting the ID and storing it into variable called "playlistsongid"
<?php
session_start();
if(!isset($_GET['id'])) die("No id set"); ?>
<?php $playlistsongid = $_GET['id']; ?>
function setupyoutubesongarray(firstload) {
$.ajax({
'url': 'post.php',
'async': false,
success: function (response) {
var posturl="post.php"; // needs to looks something like post.php?id=
$.getJSON(posturl,function(data){
youtubesongs = [];
$.each(data.members, function(i,song){
result = (song.SongUrl);
youtubesongs.push(result);
//ytplayer_playlist.push(result);
});
loadnextbatchfromsongsarray();
if (firstload = 1) {
ytplayer_render_player();
}
});
}
});
}
Any help would be much apreceated!