Calling a PHP function using AJAX, how?
Welcome!
I am not sure if this is right section (because of AJAX section)....
I have 1 php file - "functions.php" containing many functions like add(), edit() etc.
But IDK how to operate'em using AJAX HMLHttpRequest()....actually I M confused at ...
Here are files, let me know how to operate functions using AJAX and yes... parameters are required. And yes....POST method is required too.
functions.php:
PHP Code:
function add($name) {
echo $name.' add function is working'; //Just to test
};
function edit($name|) {
echo $name.' edit function is working'; //Just to test
};
beta.html:
HTML Code:
<!DOCTYPE html>
<html>
<head>
<script>
// variable named XMLHTTP is used for creating XMLHttpRequest();
</script>
</head>
Sorry if i didn't explained well enough, hope you will get it.
Thanks in advance. :D