Simple PHP,AJAX application for get updates without doing any action at the client side using prototype JavaScript framework

This sample program contains 5 php files as follows;

1) config.php – This file use for manage the database access configuration.
2) add_name.php – This file use for send data to insert_name.php using AJAX.
3) insert_name.php – This file use for insert new record (which are receive from the add_name.php file) to the database.
4) view_names.php – This file use for view the database and database changes.
5) select_names.php – This file use for get all database data and print.

I have user a javascript framework called “PROTOTYPE” to develop this example (don’t worry, its not gona be a hard job for you). It is a single javascript file. So you have to download the latest version of it from (the file called prototype.js)

config.php is required for manage your database connection information easily.
// change the parameters to connect to your DB
// CHANGE ONLY $db_host, $db_name, $username, $password


add_name.php is provide a text field for enter the data (eg: names) into the database. By clicking the insert button the text form data send to the insert_name.php through ajax functions of prototype javascript framework.


function insertName(){
new Ajax.Request(‘insert.php’, {
parameters: $(‘name’).serialize(true),

insert_name.php is insert post data to the database.
// Connection to Database
// Remove HTML tag to prevent query injection
$name = strip_tags($_POST[‘name’]);

echo $name;
} else { echo ‘0’; }

view_names.php is print the data of the database. It call the select_names.php file and get the data.

DB names

new Ajax.PeriodicalUpdater(‘names’, ‘select_names.php’,
method: ‘get’,
insertion: Element.update,
frequency: 1,
decay: 1

selest_names.php is get the data from the database and print.
while ($row = mysql_fetch_array($result)){
echo “”.$row[0].””;
echo “”;



How to use different types of page numbering formats in a same word .doc file

When we writing well formatted project reports, use (i), (ii), (iii)… page numbering format for pages before the main chapters. For main chapters we use kind of 1, 2, 3… formats. There are few steps to manage this page numberings for different parts.

Steps for MS Office 2007

Lets think we need to add (i), (ii), (iii)… page numbering format for first 5 pages and 1, 2, 3… page numbering format for rest of the doc.

Step1: Goto page 5 click on that page (Lets think the doc start at page 1, not 0)

Step2: Page Layout tab -> Breaks (in the Page Setup section) -> Section Break -> Next Page
This will start a new new section and it start at page 6.

Step3: Goto any page in first section (page1 – page5) and click on it.

Step4 : Insert tab -> Page Number (in the Header Footer section) -> Format Page Numbers…
-> Choose i, ii, iii…. number format (in the Page Number Format dialog box) -> Ok

Step5: Do the same above steps to set page numbers to next section with selecting the 1, 2, 3…
number format

Some free software ER diagramming tools

RISE Editor

UML tool for draw UML diagrams fast (a free software)

Free UML Tool for Fast UML Diagrams

UMLet is an open-source UML tool with a simple user interface: draw UML diagrams fast, export diagrams to eps, pdf, jpg, svg, and clipboard, share diagrams using Eclipse, and create new, custom UML elements.

download :


%d bloggers like this: