0
How to use ajax in php ??
Learn php with ajax
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
0
ajax in php ?
or using ajax to call a php from client/browser
0
Show data without browser reloading ?
0
Ok thank you for the advice. Nice to meet you.