Category : PHP

How to add jquery events to dynamically or ajax loaded classes?

I am writing this post ..because  i hv strucked  in a problem in binding  jquery events with classes which were created dynamically in future.  i.e. the content(table) was made with Ajax. As we know, in document.ready function : The jQuery document ready function executes when the DOM (Document Object Model) is completely loaded in the

Read More →

630 total views, no views today

cakephp : apply validation on form using model but doesn’t have actually table exist in database.

Problem : model which doesn’t actually have a table. for example validating a form on site e.g contact form Solution :

Note: just use var $useTable = false; 527 total views, no views today

527 total views, no views today

Convert HTML to pdf in php

In some projects we may need to convert HTML content to PDF for various reasons: transfer, storage, print.The presentation below will try to guide you how to do it, using PHP.When available, we concentrate on open-source or free solutions as first choice. This solution uses DOMPDF project. It simply gets a HTML text and generates a

Read More →

728 total views, no views today

How to create a simple and efficient PHP cache

When working on php websites made from scratch and without a framework, speed can often be an issue. Caching is extremely useful in order to speed up PHP webpages. In this article, I’ll show you a super easy and efficient way to dynamically cache php pages that need to be faster. Step one: Create the

Read More →

671 total views, no views today

Sort Objects by Property with PHP

I recently needed to display a list of authors within a WordPress blog.  The goal was to sort the author list by number of posts before outputting the list.  The method for calculating number of posts isn’t a sortable key within WordPress’ get_posts, so I had to sort the result list myself.  PHP’s usort method, along with a

Read More →

609 total views, no views today

1 2 3 4 9