I was creating a webpage that calls a different PHP function which is on a single PHP page. let me explain with a example: page1 contains this jscript:
$.post("function.php", {
func: "fun1",
fun_var: $('#fun1').val() });
and page2 contains
$.post("function.php", {
func: "fun2",
fun_var2: $('#fun2').val() });
and function page contains
fun1()
{
return $result1
}
fun2()
{
return $result2
}
my problem none of the function is called, and I could not found where I am making mistake can any one please provide me the simple skeleton of this type of problem