Is it possible to execute PHP code without reloading the whole webpage?

India
April 4, 2013 9:52pm CST
We can execute java script inside a webpage according to the user responses/events without having to reload the whole webpage, this technique being Asynchronous Java Script Execution, AJAX implementation. But what i want o know is that is the same sort of implementation also possible with PHP scripts? Can we execute PHP code and change a particular part of the webpage without having to reload the whole webpage? Thanks everyone...
3 responses
@owlwings (43910)
• Cambridge, England
5 Apr 13
No. This requires a client-side application (Java, in other words). A server-side application such as PHP would require the client to reload the whole page.
• India
11 Apr 13
Cant we overcome this difficulty even through object oriented programming in PHP? PHP5 or PHP6? Thanks for the reply...
@owlwings (43910)
• Cambridge, England
11 Apr 13
You might achieve it by using frames (so that only the information in the frame is reloaded) but Java is more satisfactory from the client's point of view.
• Australia
6 Jul 13
We can use Ajax to make commands without reloading whole page.
@stringer321 (5644)
• Kiryat Ata, Israel
1 Mar 15
I know it's over a year now, since the thread was started, but, I want to explain what's the problem here with PHP. The server runs the PHP code and creates output like HTML, JS and etc... The client side gets that output and runs it. If you want to somehoe change HTML content at the clientside, with PHP, the client gives an input, the client side somehow passes that input to the server and the server can process the input, make some calculations and generate some HTML but, the client side has to get the HTML that was generated from the server. With that HTML, the client side has to reload the page again.
• India
28 Apr 13
No, absolutely not . you can't without reloading the whole page because php is server side language while , javascript is client side .