Monthly Archives: November 2010

Ajax,Jquery and PHP Availaibility Check During registration

Using Only PHP , checking the username is impossible because its takes a lot of time to go to server then back to page. The thing here is page refresh. So i have used here the ajax.This type of example can be seen during sign up, user registration and so on.


Not Available:

Every Availability check is done on keypress event.This application is developed using php,ajax and jquery.

Click here to download the source code

JQUERY length(empty) check -Form validation

This tutorial will show you how to validate the form . It simply checks whether the form elements like text, radio button i.e. the input type of the form are empty or not.
Step1: include the jquery file into your file
<script src=”js/jquery.js” type=”text/javascript”></script>

Step 2:Create a style(css) class .error in the header section

How the Validation is done:

Here validation is done on blur event. On leaving the textbox if the textbox is empty then the class error is called.

Before length check:

After:(if left empty)

Here Goes the actual code:

<script type=”text/javascript” src=”js/jquery.js”></script>

$(‘:input’).blur(function() {
if ($(this).val().length == 0) {
$(‘:input’).focus(function() {

<input type=”text” name=”name”>
<input type=”submit” name=”submit” value=”submit”>


ajax,php and jquery search like facebook

This example demonstrate the search system from the database like you search in the facebook. The records are searched on key press event.
Search with ajax, jquery and php like facebook Download Source Code

Jquery pop up on site load

when you first open your site instead of  the main page i.e the new transparent layer will be get displayed with the close button. When you click on the close button , you will have access over the main site.
jquery popup on startup Down load Source Code

PHP Arithmatic Operator

Arithmetic Operators
Example Name Result
-$a Negation Opposite of $a.
$a + $b Addition Sum of $a and $b.
$a – $b Subtraction Difference of $a and $b.
$a * $b Multiplication Product of $a and $b.
$a / $b Division Quotient of $a and $b.
$a % $b Modulus Remainder of $a divided by $b.