You send data via POST, you do not need the character '?' at the beginning of the params variable, I also recommend you encode JSONString to avoid problems.
Note that you are not given the var statement for the ajax variable, this declares it globally (window.ajax), and I think you don't need it globally ...
function runAjax(JSONstring) { var params = "data=" + encodeURIComponent(JSONstring), ajax = getHTTPObject(); ajax.open("POST", "createtrip.php", true); ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); ajax.setRequestHeader("Content-length", params.length); ajax.setRequestHeader("Connection", "close"); ajax.onreadystatechange = serverSpeaks; ajax.send(params); }
source share