Hi,
I have a database program that creates URL's that look like this...
http://www.mywebsiteDB.com/admin.php?toDo=module&module=RESERVATIONS&modsub=reservations
or this
http://www.mywebsiteDB.com/admin.php?toDo=module&module=RESERVATIONS&modsub=upcoming
etc.
I need to make a page that inserts fields into the database AJAX style, which I managed to do outside of the database program. However, when I put the code into a database page, I get this error...
Could not connect: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2).
This is not the result of a misconfigured php file, as the database works fine otherwise.
From what I can tell, the error is the result of some kind of two XMLHttpRequests running into each other.
The one that the database uses and the new one that I am introducing into the page.
So, my question is, what code do i need to use to make the two requests work in harmony. I thought of trying to trap the database request in a variable, then set the XMLHttpRequest to "", then after the new request, set the variable back to the orignal, but that did not work. Here is the code I am using to create the XMLHttpRequest object...
function createObject() {
var request_type;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
request_type = new ActiveXObject("Microsoft.XMLHTTP");
}else{
request_type = new XMLHttpRequest();
}
return request_type;
}
var http = createObject();
I did not write the code to the database, i am not that skilled yet, and everything I know about programming is self taught. So my knowledge is limited.
Thank you!