var arg = {};
var arg1="name";
var arg2="time";
var value1="John";
var value2="2pm";
arg[arg1]=value1;
arg[arg2]=value2;
$.post("index.php", arg);