MongoDB PHP 7 CRUD Example

We know MongoDB is very popular open source, document based NoSQL database. In this tutorial we will create MongoDB PHP 7 CRUD Example.  CRUD means Create, Read, Update and Delete operations. So basically you will add new data (create), fetch data (read), edit existing data (update) and remove existing data (delete) from database.

Please make sure you have read how to configure MongoDB with PHP 7 for XAMPP before reading MongoDB PHP 7 CRUD Example.

Continue reading “MongoDB PHP 7 CRUD Example”

Configure MongoDB with PHP 7 for XAMPP on Windows

This tutorial will show you how to configure MongoDB PHP 7 for XAMPP on Windows. XAMPP is an open source, easy to install Apache distribution containing PHP, Perl and MySQL. It’s very easy to install after downloading the Windows exe inataller file.

MongoDB is one of the widely used NoSQL(Not only SQL) database in market today. MongoDB is a document database with the scalability and flexibility that you want with the querying and indexing that you need. Often we come across a situation where we end up using MongoDB with PHP in XAMPP stack.

Continue reading “Configure MongoDB with PHP 7 for XAMPP on Windows”

Save Files to MySQL using PHP

We have seen file upload using PHP in previous tutorials PHP file upload but in this tutorial we will see how to save files to MySQL database using PHP.

You may be wonder why you would need to save file content into database rather than just into the file system. In situations where PHP application needs to put entire file then the preferred method would be to put the file into server’s file system and save the file path into the database.

However in situations, where an application needs to save the entire file content into database along with other data. In such cases you have to put the file content into MySQL’s BLOB data type field.

Continue reading “Save Files to MySQL using PHP”

PHP Multiple Files Upload Example

PHP multiple files upload example will show you how to upload multiple files using PHP. In this example the files are selected using the browse buttons and files are uploaded to the ‘uploads’ directory under root project directory. PHP script stores the files into the defined location and returns response as a success or failure message from the PHP script. As a validation step I have added only to check if you have selected at least one file for uploading or not.

You may want to read also PHP Single File Upload Example

This tutorial will give you more attachment link for uploading file, so you will click on Attach another file then you will get Choose File button to attach another file. If you do not want to upload the chosen file then you can delete the attached file using Delete link.

Continue reading “PHP Multiple Files Upload Example”

AngularJS PHP REST CRUD Example

In this tutorial we will see the integration of AngularJS with PHP REST. We are going to create CRUD application using PHP REST API on server side and AngularJS is encapsulated within html file on client side. Thus the client will communicate with server asynchronously using AngularJS $http service.

Please read REST API CRUD Example in PHP, MySQL for server side before reading this tutorial.

Continue reading “AngularJS PHP REST CRUD Example”


In this tutorial I am going to show you how we can work with RESTful webservice or REST webservice in PHP PDO, MySQL.


The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources. A RESTful Web service is implemented using HTTP and the principles of REST. Typically, a RESTful Web service should define the following aspects:

The base/root URI for the Web service such as http://<host>/<appcontext/contextpath>/<url pattern>/<resources>.
The MIME type of the response data supported, which are JSON/XML/TEXT/HTML etc.
The set of operations supported by the service. (for example, POST, GET, PUT or DELETE). Continue reading “REST API CRUD Example in PHP, MySQL”

Remove version from css & js files in WordPress

In this post I will show how we can remove the version number from CSS & JS files.

Many css and js files in the WordPress have the WordPress version number appended to their source. Therefore to improve the speed of website as much as possible we need to remove query strings from css and js files. When we analyze site’s page using any page speed analyzer such as Google’s Page Speed, YSlow or Pingdom, we are very likely to see suggestions to remove query strings from css and js files. This is a problem as many proxies will not cache the resources if it has a query string in the URL. Continue reading “Remove version from css & js files in WordPress”