Automatic Serial Number & Zebra Striping in HTML Table Rows with CSS


Today i will going to explain how to add automatic serial numbers and zebra striping in HTML table rows with CSS.

I will write simple HTML table code and i am leaving empty first

of every row, automatically generated serial number will use that empty

.

14 Comments

Facebook Official Page: All PHP Tricks

Twitter Official Page: All PHP Tricks

How to Select Deselect All Checkboxes using jQuery


Today i will share a very nice and simple tutorial, this tutorial will explain you how to select or deselect all checkboxes using jQuery.

You will need to include jQuery library in the header or footer of the website, otherwise this tutorial will not work.

6 Comments

Facebook Official Page: All PHP Tricks

Twitter Official Page: All PHP Tricks

PHP Time Ago Function


Time Ago Function is a function that is commonly used to display time in human understandable format, as you have seen many times on social networks, whenever you post any status on your Facebook, Twitter or any other network, it says posted few seconds ago, 1 min ago, 1 hour age, etc. This is actually done by subtracting the post published time from the current time.

For this purpose we need to store a date in database, date should be in MySQL standard date and time format (“Y-m-d H:i:s”).

12 Comments

Facebook Official Page: All PHP Tricks

Twitter Official Page: All PHP Tricks

How to Run PHP Files on Localhost?


This is my first post on my AllPHPTricks blog so i would like to start with the beginning so even if you are not aware how to run PHP on your local machine you can do it just following this tutorial, let me introduce first XAMPP.

What is XAMPP?

XAMPP stands for Cross-Platform (X), Apache (A), MySQL (M), PHP (P) and Perl (P). XAMPP is very simple and lightweight Apache distribution, i prefer to use it because you can install it any platform Windows, Linux or Mac.

XAMPP has four main components:

1. Apache
2. MySQL
3. PHP
4. Perl

1. Apache

Apache is a web server that processes PHP files and convert them into simple HTML and send it to the web browser of a user. Apache is the most famous web server today, more than 50% websites using it.

2. MySQL

Almost all the websites that are dynamic needs to store data for that purpose we uses a database. MySQL is an open source and the world’s most famous database management system.

11 Comments

Facebook Official Page: All PHP Tricks

Twitter Official Page: All PHP Tricks