-
Book Overview & Buying
-
Table Of Contents
PHP and MongoDB Web Development Beginner's Guide
We know what MongoDB is, and what it is good for. We also have a PHP and MongoDB development environment set up. It is time for us to dive into some coding. In this chapter, we are going to build a very simple web application using PHP and HTML/CSS, with MongoDB as the data store. Through the practical examples of building components of this web app, we are going to learn how we store, retrieve, and manipulate data in Mongo.
In this chapter, we will learn how to use PHP to:
Connect to a MongoDB database
Save documents in a collection
Querying documents in a collection
Performing range queries
Sorting documents
Updating a document
Deleting one or more documents from a collection
Embedded and referenced documents
For our first MongoDB powered web application, we are going to build a very simple blogging website. The reason I chose to build a blog as our first example application is because it is a CRUD (Create, Read, Update...
Change the font size
Change margin width
Change background colour