Development Wall

help for php, codeigniter, javascript, jquery, mysql, apache, ubuntu

Archives for the ‘PHP’ Category

How to install Zend Framework in Ubuntu

By • Jul 7th, 2012 • Category: PHP, Zend

Zend Framework  is one of the most powerful  framework for PHP, it has lots of built in component and its very useful to develop large scale complex web  application. I will show how to install Zend Application Framework on Ubuntu. I hope you have already installed php, apache in you Ubuntu box. Download the latest version [...]



Create a secure password hash with SHA256 in php

By • Jun 13th, 2012 • Category: PHP

Most of the time PHP developers encrypt password with MD5. But this days we need more secure encrypted  password. Bellow I will show how to use SHA256 encryption method to create secure password hash. We just need  two simple function: First function genenrate_salt create a random string which will be used as salt for password [...]



Very small php function to calculate age from date of birth

By • May 16th, 2012 • Category: PHP

The bellow simple function will calculate  age from a date of birth Output: I am  12 years old



Install Apache, PHP, MYSQL and phpMyAdmin in Ubuntu

By • Apr 1st, 2012 • Category: Apache, MYSql, PHP, Ubuntu

I will show the command and configuration to install Apache, PHP, MYSQL and phpMyAdmin in Ubuntu 1. Installing  Apache Open your terminal and type the bellow command        #sudo apt-get install apache2 It will ask for your password, Type your ubuntu password and press  enter key, it will ask for confirmation Type y and press [...]



Simple way to detect iPad or iPhone from the php

By • Mar 24th, 2012 • Category: PHP

Sometimes you may need to detect iPad and iPhone from the PHP. This is very simple to do this. Bellow I will show the code to detect iPad and iPhone from the PHP 1.    Detect  iPad 2. Detect  iPhone



Easy way to remove index.php file from Codeigniter

By • Mar 22nd, 2012 • Category: Codeiniter, PHP

Clean url is very important for today’s web applications. Search engine gives higher  priority for the sites which have clean url. Codeigniter is one of the most popular PHP  framework. By default it shows index.php page in the url. By default it will show the url like  http://localhost/my-application-name/index.php/news/hello I will show very easy way to [...]



Create random number using time stamp in php

By • Mar 12th, 2012 • Category: PHP

In bellow function I will show how to create random number using php time stamp. This is very small function but might be useful when you need random unique number. As this function use current time stamp, so there is no chances to duplicate the number. You can define the random number length using the [...]



useful function to generate random string in php

By • Mar 9th, 2012 • Category: PHP

Some times we need random string for various operation, like creating a password for user. The bellow function will give you a random string, you just need to pass the desire length as a parameter into the function.



Creating multiple database connection in codeigniter

By • Mar 9th, 2012 • Category: Codeiniter, PHP

If you are working in codeigniter, it may need to use multiple database connection for a single application In bellow tutorial  I will show how to create more then one database connection in codeigniter and use the connection in Model to perform  database operation. I am going  create 2 database connection one for read operation [...]



custom php function to create permalink from a string

By • Mar 8th, 2012 • Category: PHP

The bellow function will create permalink from string . It takes string  as parameter and return the permalink. Output: the-world-is-not-enough