How Does PHP Session Works

Basically, the session is the system or way to store information for individual users. It’s storing individual users information against a unique session ID. So in this way, user’s data can be accessible across all pages of a website. PHP follow simple workflow for manage session, and that is when a session is started, then PHP

Understanding of PHP Traits

As we know PHP is a single inheritance language, so what does it mean? It means one class can only inherit from another one class. So it doesn’t allow to inheriting from multiple class. But sometimes it’s might be beneficial to inherit from multiple classes. To take care of this problem PHP introduced Traits in

Return Image as response by PHP

To return an image as a request response by PHP you fpassthru function of PHP. I have included a sample code snippet, which will help you to understand how to do this. From the above code snippet, you can see I have opened an image with binary mode by fopen($image, ‘rb‘). And then send that with appropriate headers by header(“Content-Type: image/png”).

Download and then Print PDF File in AngularJS

Sometime developer need to download PDF file and print that pdf document. Here I have shared a code snippet for download pdf then print that pdf using angularJS. $scope.printPdf = function (uuid){ $http({ url : ‘PDF_URL’, method : ‘GET’, headers : { ‘Content-type’ : ‘application/pdf’ }, responseType : ‘arraybuffer’ }).success(function(data, status, headers, config) { var

How to Validate Password and Confirm Password in AngularJS

Password and confirm password validation is very common and vital piece of all sort of application. We mostly use it when we are working in signup or password changes page. Here I have written this article to describe AngularJS validation. I will not cover all validation rules in AngularJS, but I will only focus on how to