Skip to main content

PHP PDO OOP CRUD Class with Bootstrap

In this Article we are going to learn about PHP PDO class, which can perform Create, Read, Update and Delete (CRUD). If you don’t know about PDO please refer to the PDO reference link before heading to this article.

Download

File Structure

Our File Structure will be as following:

File structure

Database Schema

Create Database named pdocrud and import the following table. Use following mysql query which will create a User table with 4 fields. id, firstname , lastname, and email.

Configuration

In the file structure you can see the config.php, which is our configuration file. This file is responsible for our database connection, and we also include our CRUD class here like include_once 'class.php-crud.php'; use the following code for the config.php file.

IOS Push Notification PHP class using Apple Push Notification Service (APNs)

Apple Push Notification Service (APNs) is the center peace of the remote notification features. It is quick and highly efficient service for receiving notification throw-out the IOS devices. Apple Push Notification service sends and routes remote notifications for your apps from your provider to each user’s device. You can send notifications through APNs to many devices on which the client apps are installed. You can find more about APNs on official Apple developer site at https://developer.apple.com/. This tutorial is dedicated to Ankit Kansara who submitted a request throw our Request a Tutorial page for Ios PUSH NOTIFICATION PHP Class

Installing PHP 7 on WAMP server (For windows)

The PHP community has released major update over a decade as PHP 7. PHP 5 brings many exited features like support of Object oriented programming and many related with that.

You guys may wonder why PHP community released PHP 7 just after PHP 5 why there is no PHP 6? Well requirement for PHP 6 were not defined clearly and most of the people not agreed with, so the project ground to the halt. Almost all the features defined for PHP 6 were already implemented in PHP 5.3 and it’s later versions of PHP 5. So we almost got everything, which was documented for PHP 6, when features set for a major release community decided to avoid confusion with dead project and skip to PHP version 7 with the major updates.

Android Push Notification PHP class using Google Cloud Messaging (GCM)

Google cloud Messaging (GCM) is a service that helps developer to send push notification data to any Android devices. With help of this feature developer can send push message to Android device whenever new data or promotion offers arrives in Android application.

Today lots of Android applications using Google cloud Messaging service to send multiple push messages to multiple Android devices. You can find more at it’s official document at https://developers.google.com/cloud-messaging/

Push Notification flow with PHP Web Server APP and GCM

android_push

  1. Android device send Sender Id and application Id to GCM server.
  2. GCM server generates unique registration Id and sends them back to Android device.
  3. Android device sends registration Id to PHP web server application.
  4. PHP web server stores registration Id to Database for later use.
  1. When server needs to send Push Message, It fetch previously stored registration Id from Database
  2. And send them to the GCM server along with the push message data.
  3. GCM server will send that message to particular Android device using device registration Id

Resize Image Dynamically in PHP with TimThumb

PHP TimThumb

TimThumb is simple, flexible yet powerful php script that resizes images dynamically. Every website or blog uses thumbnail images, it’s a very useful part of the website.If you don’t see any images or thumbnail you quickly skip the website or article. You wont read it in deep but if you find few thumbnails between or in start of the News or article you would like to read and stay more on the page or article. It’s human nature visual images attracts mind rather than just bunch of words, isn’t it?