I have tried everything I could find to combine these two AJAX requests into one request,
Is there a doable answer?
<!doctype html>
<html>
<head>
<meta charset=utf-8"/>
<title>Test sessions</title>
<script src="../js/jquery.js" ></script>
</head>
<script>
$(function() {
$("#btn_test").click(function(){
$.post("sessions_set.php", {
key: "test_type",
value: "any old type"
});
$.post("sessions_set.php", {
key: "test_mode",
value: "any mode"
});
});
}) ;
</script>
<button id="btn_test" />Click
<?php session_start();
$_SESSION{$_REQUEST["key"]} = $_REQUEST["value"];
?>