0

How to use ajax in php ??

Learn php with ajax

26th Sep 2019, 8:20 AM
andri maya
andri maya - avatar
4 ответов
+ 2
okay, first the php file need to serve a data/resource. not an actual web page. you can return a xml or json. so forexample when you call the php the result are {comment:[{name:"Denise",comment:"Good Morning Mark!"}]} instead of a full webpage containing "Good Morning Mark" comment. next is learn the ajax itself, its pretty simple but too long for me to write and explain it all here. so https://www.w3schools.com/xml/ajax_intro.asp after you recieve the data from ajax, now you can alter the html document using javascript using the data you get from ajax call. how ? by editing InnerHTML or add a new child containing the data, etc
26th Sep 2019, 9:10 AM
Taste
Taste - avatar
0
ajax in php ? or using ajax to call a php from client/browser
26th Sep 2019, 8:44 AM
Taste
Taste - avatar
0
Show data without browser reloading ?
26th Sep 2019, 8:56 AM
andri maya
andri maya - avatar
0
Ok thank you for the advice. Nice to meet you.
26th Sep 2019, 9:16 AM
andri maya
andri maya - avatar