Here’s a simple way to execute the windows dir or the linux ls in PHP Windows: <?php $row = exec(‘dir’,$output,$error); while(list(,$row) = each($output)){ echo $row, “<BR>n”; } if($error){ echo “Error […]
Here’s a simple function that calculates the number of days between two dates. <?php //day’s seconds = 86400 function days_between($day_i,$month_i,$year_i,$day_f,$month_f,$year_f){ $days_in_between = (mktime(0,0,0,$month_f,$day_f,$year_f) – mktime(0,0,0,$month_i,$day_i,$year_i))/86400; return $days_in_between; } ?> //If […]
The following is an example of using the transactional support in MySQL. Let’s assume we have two tables, USERTBL and EMAILTBL. Let’s consider the innodb engine, since it’s the most […]
Heres a list of actions you should do in order to get PHP + MySQL working with UTF-8: 1. Database: CREATE DATABASE db_name CHARACTER SET utf8 DEFAULT CHARACTER SET utf8 […]
Inspired by the nice download button on the jquery homepage I created this button with a hover effect. It uses opacity options for all browsers. You can see a demo […]
Here is a simple PHP function that returns the exact age of a person given his/her birthdate: function age($month, $day, $year){ $y = gmstrftime(“%Y”); $m = gmstrftime(“%m”); $d = gmstrftime(“%d”); […]
Ever wondered how to generate some cool gmail labels in css? Here is an attempt to imitate the little labels used in gmail. Three tiny colorless images are used to […]
Here is a very simple and cool registration form. A lot of times I was searching for some registration or login form that is easy to adapt. Here comes my contribution to the community. I hope you can use it!
This is an example of a very simple CSS + one tiny image chart. The result will look like this: Insert the follwoing style into the head of your html […]
Let’s create a simple and clean box that shows the updates in a category (or anything you might like it to use for). The result looks like this: Starting with […]