javascript - Using AJAX data / variables to target a specific PHP Switch: Case (Run a PHP switch from AJAX) -


part of oauth program writing involves updating information database linked single php file. php file has simple switches so

 switch ($server_functions) {    case "recover":     //function()     $full_name = $_post['full_name'];     break;    case: "register":     //function()    break; } 

how target 1 specific switch using ajax function? using jquery far, each switch has own list of variables posting jquery. far seperating php switches mini files has been fruitful , seem work well, thats not bosses want. how can guys save job?

ajax:

var data = {   "switch": "recover" }; $.ajax({    type: "post",    datatype: "json",    url: "response.php", //relative or absolute path response.php file    data: data,    success: function(data) { 


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -