Chapter 1
Melding PHP and JavaScript with Ajax and JSON
IN THIS CHAPTER
Making sense of Ajax
Loading server data into a page element
Sending data to and receiving data from the server
Getting to know JSON
Using JSON to work with complex data from the server
Basically, what “Ajax” means is “JavaScript now works.” And that in turn means that web-based applications can now be made to work much more like desktop ones.
— PAUL GRAHAM
When coding web pages, it feels like there’s a great divide between the browser front end and the server back end. When you’re working on the front end, you can use HTML tags, CSS properties, and JavaScript code to build, style, and animate your pages. When you’re working on the back end, you can use MySQL and PHP code to define, access, and manipulate data. That all works, but front-end code without back-end data produces a lifeless page, whereas back-end data without front-end code produces useless information. To create a truly dynamic web page, you need ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access