Category: PHP Tutorials

How to create a Custom REST API using a Controller in Drupal 9

If you are new to Drupal 9 and wondering how to create a simple REST API, this is the right place to learn about it. You can create a REST API in multiple ways, but the one I am going …

How to create a Custom Service in Drupal 8

There are many services available in Drupal 8 by default, but sometimes we need to write our own function/logic and the functionality should be available throughout the Drupal 8 application. This can be achieved by creating a custom Service in …

Drupal 8 – How to create a custom form

In this post, we will discuss how can we create a custom form in Drupal 8. If you have already worked in Drupal 7, it’s totally different in Drupal 8.

First you need to create a custom module to create …

Codeigniter 3 – Upload file and insert data into database!

NOTE: This tutorial requires the basic knowledge of Codeigniter to understand it.

In this post, we are going to see how to upload a file using the Codeigniter 3 framework and save the uploaded file data into the database.

I …

Insert data into database using AngularJS and PHP!

In this post, we are going to see how we can fetch from and insert data into MySQL database using AngularJS and PHP.

I am using PHP mysqli to insert records into the database. This tutorial is more concentrated on …

Let’s create a simple custom module in Drupal 8

In this post i am going to show you how you can write a simple Drupal 8 module which will print “Hello world from custom module”.

There are numerous differences between Drupal 7 and Drupal 8.  Especially folder structure, If …

PHP Script to add or subtract days, months, years to a Date!

Here is another Interesting PHP script which you can use it in your project. A PHP script to add or subtract days, months and years to date.

Preview:

php-add-days-months-year

Adding days or months or year to a date in PHP is …

jQuery Ajax File upload with Percentage Progress bar

I have already written a similar post long back using jQuery form Plugin if you wish you can see the link below:

PHP jQuery AJAX Image Upload Script download and use it!

Before going through the script you can see …

How to provide ‘Select all checkboxes’ option in Drupal 7

Drupal has provided Form API’s to create checkboxes easily unfortunately it didn’t offer a select all / deselect all checkboxes option.

But no worries, there are plenty of contributed modules are present in Drupal site which will help us to …

Theme: Overlay by Kaira
Agurchand