JS in (start.php)
$(document).ready(function()
{
$('#btn_1').click(function(){
$.ajax({
type: "POST",
url: "get_data.php",
data: 'func=getData1',
success: function(msg){
$('#div_1').html(msg);
}
});
$('#div_1').show();
})
});
PHP (somename.php)
<?php
session_start();
if(trim($_POST['func']) == "getData1")
{
echo "Test";
}
?>
How can i pass the sessionid from start.php through my ajax to the get_data.php file ? And how can pass the complete URL "url: "get_data.php," to the js-File so that i can switch the php-files, that should be called from ajax ?