Quantcast
Channel: How to call a php function from ajax? - Stack Overflow
Browsing latest articles
Browse All 6 View Live

Answer by Asef Hossini for How to call a php function from ajax?

As a structure for this kind of purposes, I suggest this:PHP<?php if(isset($_POST['action'])){ if ($_POST['action'] == "function1") { func1(); } if ($_POST['action'] == "function2") { func2(); } if...

View Article



Answer by Rajendra Rajput for How to call a php function from ajax?

jquery:$(document).ready(function(){ $('#tfa_1117700').change(function(){ var inputValue = $(this).val(); var v_token = "{{csrf_token()}}"; $.post("{{url('/each-child')}}", { dropdownValue:...

View Article

Answer by Nitheesh K P for How to call a php function from ajax?

For AJAX requestInclude jQuery Library in your web page.For e.g.<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>Call a function on button...

View Article

Answer by iliaz for How to call a php function from ajax?

If I understand correctly, yes you can.Put all your functions in one php file and have the ajax pass as a parameter which one you want to call. Then with a switch or if structure, execute the one you...

View Article

Answer by Vishnu Bhadoriya for How to call a php function from ajax?

You cannot call a PHP function directly from an AJAX request, but you can do this instead:<? php function test($data){ return $data+1; } if (isset($_POST['callFunc1'])) { echo...

View Article


How to call a php function from ajax?

I am familiar of how to get ajax to go to a php page an execute a series of things and then return json data. However is it possible to call a specific function which resides in a given page?Basically...

View Article
Browsing latest articles
Browse All 6 View Live




Latest Images