I am currently discovering the power of AJAX and as a result I started learning JavaScript, the PHP I can manage. I am currently trying to submit a form and update a sql database. It's working fine except that when I construct the url to the php file for the script to access it I find very annoying that I have to write variables for all elements and then add them to the url. It works for a small form but when things get complicated, like submitting a 44 elements form it just isn't right. I know for sure the form can be "scanned" and the url automatically constructed but I don't know where to look for info. I don't even know how to Google it.
var install_date = document.getElementById("install_date").value;
var posid = document.getElementById("posid").value;
var ip = document.getElementById("ip").value;
var pos_type = document.getElementById("pos_type").value;
var pos_sn = document.getElementById("pos_sn").value;
var pinpad_sn = document.getElementById("pinpad_sn").value;
var ID = document.getElementById("ID").value;
var url = "php/change_details.php?";
var params = "&ID=" + ID + "&install_date=" + install_date + "&posid=" + posid + "&ip=" + ip + "&pos_type=" + pos_type + "&pos_sn=" + pos_sn + "&pinpad_sn=" + pinpad_sn;
url = url+params;