Caching mysql result with memcache and php

There are many ways to boost up the performance of the website like css amalgamation with php, use of plugins, caching in your php scripts, optimize your images, database etc.

I am going to share one of the method i.e memcache which help us to optimize load on the database. Normally a request for a dynamic page triggers multiple db queries, processing of output, and finally formatting to display on browser. This process can eventually be slow on larger sites or slower servers.
Read More

Email Validation with php and jquery

Generally we are using an email address to know about unique visitors, because email id is unique address of a user and to validate that email id is must for us so that our user information prevent from spammers. Email validation is possible in any scripting language and in this post we will talk about email validation with php as well as jquery. In php we can use preg_match() function to check if the email format is correct or not. We will use the follow codes:

function checkEmail($str) {
    $regex = "/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i";
    $string = trim($str);

   return preg_match($regex, $str)) ? TRUE : FALSE;


In the above codes we made a function named checkEmail() now we will implement this function to check an email address.

Read More