Pages

Regular expression in PHP (part 1)

Tuesday, September 11, 2012
We deal with at least one form on almost every project. So we need to validate this form. You can do the validation with javascript on the client side. But we also need to validate on the server side because user can turn off the javascript. To do the form validation on the server side, we need to understand about the regular expression. Let's start with the simple example. <?php $string = "webinone"; echo preg_match("/in/",...
Read more ...

Navigation System or Template with PHP and jQuery

Thursday, May 24, 2012
In this tutorial I will explain you how to create a navigation system or dynamic menu system or simple template system by using php include function, $_SESSION and some jQuery function. Below screenshot is our latest view. In this tutorial we will create 7 files like below. You can see demo here. Demo 1. header.php - It is a header...
Read more ...

Codeigniter Template Library for Wordpress Fun

Thursday, May 24, 2012
I am not only a Codeigniter fun but also Wordpress fun. So I try to crate a CI template library that look like Wordpress theme. I have got this library and it will be used with the helper together. By using this library, you can crate the themes like in Wordpress. RequirementCodeigniter 2.0.0 and above InstallingCopy and paste below code in your new document and save as ./application/libraries/Template.php <?php if (...
Read more ...

Registration system with email verifying in PHP

Wednesday, May 23, 2012
In this tutorial I will show how to write a sign up form with email verification or confirmation in php. If your website use a registration form, you need to use email verification to reduce the spam and to make sure the email supplied belongs to that member. In this tutorial I create a 7 file like below. 1. index.php - I write a registration form in this file. 2. configdb.php - to connect the database. 3. register.php - In...
Read more ...

Date validation for Codeigniter 2

Wednesday, May 23, 2012
I wrote a tutorial here about the CI date. At that post I used the HTML <select> for the input of date. Sometime our client can want to use text box for the date input. We need the validation for this date. I have found this code from here. It is for CI 1.7.* and PHP 5.2.*. So I change some code for the CI 2.0.* and PHP 5.3.*. To use, copy the class below into your application/libraries folder named MY_Form_validation.php,...
Read more ...

jQuery Ajax form validation in Codeigniter

Sunday, May 20, 2012
This tutorial is part 2 of User Registration with Codeigniter. In the previous tutorial, we do the form validation in the sever side. In this tutorial, we will do the form validation by using the ajax technology. So user can know whether his/her form valid or not before submitting. RequirementCodeIgniter jQuery Our last screen shot Create...
Read more ...

User Registration with Codeigniter

Sunday, May 20, 2012
In this tutorial, I will explain you user registration with CI. If you are a very newbies in CI, you can start by reading How to start with CI? or read this excellent article Everything You Need to Get Started With CodeIgniter. If you have finished our previous tutorial, we can start this tutorial now. The CI classes we have to learn in this tutorial are session and form validation. I believe that you would be familiar with...
Read more ...

Auto complete text box with PHP, jQuery and MySql

Thursday, May 17, 2012
In this tutorial I want to show you how easy to do a auto complete text box with PHP, jQuery and MySql. Firstly download the autocomplete jQuery plugin and extract it to your hard drive. And then create a folder in your localhost. Copy jquery.autocomplete.css and jquery.autocomplete.js file to your project folder. And you will also need...
Read more ...

Ajax Login form with jQuery and PHP

Tuesday, May 15, 2012
In this tutorial, I will explain you how to create a ajax popup log in form with jquery and php. Demo Firstly let's create a folder in your www (for wamp) folder and name as ajax_login. Crate a blank document in your favourite editor and paste following code in your document. And then save as index.php in your ajax_login folder. I have divided index.php into 2 parts. Below is our body part. <body> <?php session_start();...
Read more ...

Basic PHP Crash Course (part 7)

Saturday, May 12, 2012
In this post, we discuss how to retrieve or select the data from MySQL database to view our pizza order. To do so we should create admin folder. So that we can prevent the customer from viewing our admin data. Create a folder named admin in our pizza_shop folder. Open the new document in your favourite editor or Notepad and type below...
Read more ...

Basic PHP Crash Course (part 6)

Thursday, April 19, 2012
In the early posts, we do not save the order data. To deliver the user order, we have to save the order data permanently. To do so we will need suitable database server. I will use MySQL. What is MySQL?MySQL is a Relational Database Management System. It can store, search, sort and retrieve data efficiently. You can use it freely under...
Read more ...

Basic PHP Crash Course (part 5)

Monday, April 9, 2012
This post is part 5 of the Basic PHP Crash Course. If you have never red before this Crash Course, you should read part 1, part 2, part 3 and part 4 first. In this post, we will discuss about our site design or template. For a website it will has header, sidebar, content and footer. So we need to add some html code to our index.php. Following...
Read more ...

Basic PHP Crash Course (part 4)

Tuesday, April 3, 2012
This post is part 4 of the Basic PHP Crash Course. If you have never red before this Crash Course, you should read part 1, part 2 and part 3 first. In this post we will discuss about PHP Session. It is very useful when you write a web application. Let's think about our pizza shop website. After the user have submitted the order form, our application will call the process.php. Then I want to show the order form again, if the...
Read more ...