 |
Ill start by giving the code to the guest book then I will give a step by step on what each part does.
<?php
if(isset($_POST) && isset($_POST))
{
if($_POST != "" && $_POST != "")
{
$F_D = getdate();
$FT = $F_D."/".$F_D."/".$F_D;
By vishal sharma
|
0 32,066 |
 |
Introduction
Suppose you want to know the age of a person given her birth date. Let’s say her birth date is "09-23-1969". Although in this case you might say that we don’t need a program to compute the age, but assuming there are 1000s of records in your database and for every person you have to...
By pradeep
|
0 63,079 |
 |
Many times its required that we truncate a long string and add ellipsis to the end of the truncated string. Here's a function which does exactly that.
function truncate( $varb, $num )
{
$dnum = intval($num);
if (strlen($varb)>$dnum)
{
$nvarb = substr($varb, 0,...
By pradeep
|
0 2,729 |
 |
Sometimes we need to find the number of items, located inside an array.Let's take this array as example,
$a=1;
$a=3;
$a=4;
$a=5; here the total item count is 4, but when you use count() function you get 3. So I wrote a small function which counts array elements, even recursively.
...
By pradeep
|
0 4,263 |
 |
If you have PHP4 working on your server, and have heard that PHP5 may screw up things. Here's how to have both running alongside.
#!/bin/sh
# PHP5 CGI Installer for cPanel/WHM Servers
VERSION=5.0.4
cd /usr/src
wget -O php.tbz2...
By pradeep
|
0 3,317 |