Miko Posted August 25, 2009 Share Posted August 25, 2009 Hello, I'm a total noob if it comes to Ajax and also javascript, so that's why I come here I have this code: function getSubCat(mainCat) { createXMLHttpRequest(); var params = "titleid="+mainCat; var params = "main_cat="+mainCat; xmlHttp.open("POST", "getSubCat.php", true); xmlHttp.onreadystatechange = done; xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlHttp.send(params); } code works just fine but it will only take the var "titleid", how can I "post" both vars? Thanks Link to comment https://forums.phpfreaks.com/topic/171824-ajax-multi-var/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.