PHP

Bootstrap Progress bar to show long running PHP script

We may have a request to the back end system which may trigger a long running process such as searching huge amount of data or a long running database process. Then the front end webpage may hang and wait for the process to be finished. During this process, if we can provide the user some information […]

Import/Export excel report file in php with PHPExcel

PHPExcel – OpenXML – Read, Write and Create Excel documents in PHP – Spreadsheet engine Project providing a set of classes for the PHP programming language, which allow you to write to and read from different spreadsheet file formats, like Excel (BIFF) .xls, Excel 2007 (OfficeOpenXML) .xlsx, CSV, Libre/OpenOffice Calc .ods, Gnumeric, PDF, HTML, … […]

30+ PHP Best Practices for Beginners

PHP is the most widely-used language for programming on the web. Here are thirty best practices for beginners wanting to gain a firmer grasp of the fundamentals. Editor’s Note: The “Best Practices” series has been my baby for three articles now. However, due to my focus on the CI video series, I’ve decided to hand […]

15 Best PHP Libraries Every Developer Should Know

PHP is a powerful Web site scripting language that makes it easier for Web site developers to create dynamic and engaging Web pages. Developers can use PHP code with a number of Web site templates and frameworks for improved functionality and features. However, writing PHP code can be a tedious and time-consuming process. In order […]

20+ .htaccess Hacks Every Web Developer Should Know About

1. Prevent Hotlinking Tired of people using your bandwidth by putting the images hosted on your server on their website? Add the following code at the bottom of your .htaccess file to prevent hotlinking. 1 Options +FollowSymlinks 2 #Protect against hotlinking 3 RewriteEngine On 4 RewriteCond %{HTTP_REFERER} !^$ 5 RewriteCond %{HTTP_REFERER} !^http://(www.)?domainname.com/ [nc] 6 RewriteRule […]

PHP Redirect 301 permanently

Sometimes you might want to redirect your visitors to a new URL address. This article will show you how to make a PHP redirect using the 301 “moved permanently” redirection. This is the one you should use as it is the most search engine friendly. Like the name suggests, PHP redirect tells the browser (or […]

Using PHP to Backup MySQL Databases

There are at least three ways to backup your MySQL Database :   Execute a database backup query from PHP file. Run mysqldump using system() function. Use phpMyAdmin to do the backup. Execute a database backup query from PHP file Below is an example of using SELECT INTO OUTFILE query for creating table backup : […]

Fundamentals of Web Design

Designing a web site needs careful thinking and planning. The most important thing is to KNOW YOUR AUDIENCE. Users are Scanners A typical visitor will NOT read the entire content of your Web page! No matter how much useful information you put into a Web page, a visitor will only spend a few seconds scanning […]

Simple Pagination with CodeIgniter Framework and Bootstrap

Introduction Pagination is a feature that is used to restrict the display of the data that is not too long and neater. As seen in the illustration on the front of this article. Use pagination commonly used to display large amounts of data, so it can be separated / selected how the data will be […]