php - Modify the server side functions using jquery -


i developing 1 website using cakephp , jquery technologies.

server-side there functions handles sql queries.

as per requirement want modify server side functions on client side using jquery ajax call.

e.g. : below function on server side modify users information.

function modifyuser(username,userid) {   //update query statements } 

then jquery ajax call this:

$.ajax({   url: 'users/modiyuser',   success: function() {     alert("updation done") or statements.   } }); 

and want modify above i.e. server side function depending upon client input criteria.

$.ajax({  function users/modiyuser(username,userid) {     // write here other statements gives me other output.  } }); 

above ajax call syntax may not present, think understood trying wants modify/override server side functions on client side.

please let me know there way resolve above mentioned requirement.

thanks in advance

you cannot call php functions client directly. can make http request uri.

the uri determines php script run. input can taken via $_get, $_post, , $_cookie (among others, main ones).

you can either write separate scripts each function or determine based on user input.


Comments

Popular posts from this blog

Delphi Wmi Query on a Remote Machine -