Category Archives: PHP

This section is related to PHP programming, CSS, HTML, Javascript, AJAX, JQuery.

Restful web services using slim and PHP

I have created a restful webservices using slim framework and PHP. I have created APIs for simulation atm machine.  In my case, ATM machine is PC and PC have uniquie name and password. The PC information is save in a file in jSOn format (serviceconfig.txt);


If you want to add another machine, add it in the above jSon..

And user information is saved in file(2007_1.txt);


If you want to create another user ,you will create another file having name userid_1.txt.

And its mini statement info is a save in userid_2, which is automatically created.

Following work of atm is simulated;

  • Enter a 4 digit user id here to simulate a card scan.

Its is handled with post method with name and password.


  • Enter PIN screen

It is also handled with post method with name, password, userId and pin.


  • Balance check

It is handled with get method.


  • Cash withdrawal

It is also handled with post method with name, password, userId, pin and amount to withdraw.



  • PIN change

It is also handled with post method with name, password, userId, pin and changepin.

  • Mini statement

It is handled with get method.



form Validation Using Javascript

I have created program using javascript to validate the form. the code validate the pattern applied on the textbox and the requird field. Code is as following;


I have create another program which uses Modernizr to detect html 5 feature used in the form. Code is as follow;


Links Preview

Its an ajax project and in this project i have created tool tip using ajax to show the description of the link. I obtain the contents of the page of the link and show it as preview window when mouse move over the link. The project is attached in below link.