Tags
PHP , AJAX
Asked 3 years ago
13 Jul 2021
Views 602
Arnaldo

Arnaldo posted

Is Ajax same as PHP ?

Is Ajax same as PHP ?
Mitul Dabhi

Mitul Dabhi
answered Sep 23 '21 00:00

Lol No, Ajax is not the same as PHP .
Ajax is made on Javascript Which is run on the client-side, PHP is a serverside scripting language and run at Server not at client side.
Ajax is used to run Serverside code , Ajax is used to run serverside code without refreshing the website.
sachin

sachin
answered Sep 23 '21 00:00

Ajax example code :

  $.ajax({
	                type:'POST',
	                url:'ajaxData.php',
	                data:'id='+departmentID,
	                success:function(html){
	                    $('#fees_charge').html(html);
	                }
	            }); 

above Ajax code is Javascript code , run at client browser mostly.
above code submit post method to the server, and URL is the where you can see Ajax calling PHP file of the server.

Ajax is caller and PHP is called . Ajax can call any server side script like PHP , JAVA , Django (Python) etc..
Post Answer