Home » Archive

Articles tagged with: PHP

PHP »

[2 Jul 2008 | 4 Comments]

Here is the PHP code to fetch the html source code of any website specified. fopen function is used to open the website URL. stream_get_contents is used to read the opened URL. The fetched code is displayed inside a textarea.

MySQL, PHP »

[5 Mar 2008 | 55 Comments]

In this article, I will be presenting simple PHP & MySQL code to add, edit, delete and view data. This kind of system is also referred to CRUD (Create, Read, Update, Delete).
Here is a step-by-step guide on creating a CRUD system using PHP & MySQL:

PHP »

[5 Mar 2008 | 2 Comments]

Here are code samples to generate random number and strings in PHP.
Generate random numbers between 1 and 1000

PHP, Regular Expression »

[2 Mar 2008 | 7 Comments]

This article contains PHP code with regular expression to validate different numbers and strings. Integer validation can be done for validating age. Decimal validation can be done for validating price. Simple String validation can be done for validating name. Email validation can be done for validating email.
preg_match PHP function is used to perform the regular expression match.

HTML, PHP »

[9 Dec 2007 | 2 Comments]

Problem:
I want to create a dynamic HTML table with a row starting after certain number of columns, i.e. like, i want to create an html table which automatically generate new row after 3 columns in a row.
Solution:

PHP »

[9 Dec 2007 | No Comment]

Below is the code with sufficient comments on making a tree navigation menu (hierarchical menu) in PHP. A single page holding different links.
The navigation links are present at the left sidebar of the page. I have not used any dynamic approach over here. Have not used any loop. It’s just a static and straight-forward implementation of tree navigation menu. This code is a helpful reference for dynamic implementation of such tree navigation menu.

MySQL, PHP »

[8 Dec 2007 | 39 Comments]

In another article, I have written about Very Simple Add, Edit, Delete, View in PHP & MySQL. That article contains a basic CRUD (Create, Read, Update, Delete) system. It doesn’t have the feature of login and register.
In this article, I will be presenting a complete CRUD system containing login and register feature. User should register himself first. And then he can add data after logging in.