How to create a simple HTML contact form with Ajax & PHP

There are so many times we don’t want to use any PHP file (say contact.php) directly for our HTML websites to process contact form rather we prefer to use HTML contact page (say contact.html). It is not a hard task, we can do this by using Ajax or jQuery. In this tutorial I am describing the easiest way to do the same.
The form will be in any HTML extension page with validation. What we need a separate PHP file for parsing email function only.

Here are the screen shots of the forms.



Step 1: Create an HTML page (contact.html) and write the form code with jQuery library CDN and validation script file  adding.

Step 2: Add a JS file for the form validation and Ajax function of jQuery to get all the data from the submission of the form as soon as the form sends the values to email.php .

Step 3: Create a php file as email.php and write down the main PHP mail function.

Demo | Download

Continue Reading

WordPress add Dashicons for new menu

When we add new menu page in WordPress in our custom plugins or theme functions we use the ‘add_menu_page‘ page function which can option to pass icon path of that menu.
Here is the code snippet of the default example:

add_action('admin_menu', 'members_downloads_menu');
function members_downloads_menu() {
 if (is_admin()){
 add_menu_page('Members Downloads Options', 'Members Downlods', 'manage_options', 'members-downloads','members_downloads_page',plugins_url('your-plugin-folder/images/icon.png'), 80 );

Since WordPress version 3.8 there is option to use Dashicons instead of any images used as icons. Dashicons is the official icon font of the WordPress admin as of 3.8.

Here is the code snippet to show where to replace the icon path to Dashicons:

add_action('admin_menu', 'members_downloads_menu');
function members_downloads_menu() {
 if (is_admin()){
 add_menu_page('Members Downloads Options', 'Members Downlods', 'manage_options', 'members-downloads','members_downloads_page','dashicons-download', 80 );

You can notice that I have replaced the icon path with ‘dashicons-download’ where ‘dashicons’ is referred to use font and the icon font name is ‘download’ as my menu page is supposed to use a download icon. See this original output.


You can get the list of Dashicons from WordPress official page from this link.

Continue Reading

Beautify your codes online, format source codes

If you want to be a good coder then you must format your codes properly with block commenting. It will help you a lot to update or modify your code at any time. I have worked with many coders who rarely love their codes and I had so much pain to work on their codes. It is really a pain.

There are several websites from where you can beautify (format) your codes instantly. Here are some good websites.


Supports: PHP, Java, C++, C, Perl, JavaScript, CSS


Supports: CSS


Supports: HTML, CSS, JavaScript


Supports: HTML, JavaScript

The ‘Adobe Dreamweaver’ has a built-in tool for source formatting and it is awesome with perfect source format and killing of unnecessary spaces.

Continue Reading

Disable plugin update notification for specific plugin in WordPress

The major WordPress plugins get updated on regular basis and we often login to the WordPress dashboard and notice notification for one or more plugin updates. If we ignore these updates, these notifications can pile up.

It is strongly recommended to update the WordPress plugins always to the latest versions. 

Now, think differently, if the website developer has some customization done in the plugin core file. So, if the plugin get updated, all the customized work will be gone away and your website may not work as per the previous customized version. If we can disable the specif plugin update notification, then there will be no chance to update the plugin.

There are 2 common ways to do disable specific plugin update notification.

Option 1 (Preferred):

Open the main PHP file of the plugin and just below the plugin header put the following code.

// Stop Plugin Updates
add_filter('site_transient_update_plugins', 'remove_update_notification');
function remove_update_notification($value) {
 unset($value->response[ plugin_basename(__FILE__) ]);
 return $value;


Restriction: the name of the function (remove_update_notification) is unique. You can not add the same function in different plugins to disable update notifications. If you want to disable for multiple plugins then you have to change the function name different in different plugins.
Option 2:

Get the folder and main file name of the specific plugin and put the following code in the ‘functions.php’ file of your theme.

function filter_plugin_updates( $value ) {
 // Replace the plugin folder name and main file name with your plugin's folder and file name
 unset( $value->response['akismet/akismet.php'] );
 return $value;
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );
Continue Reading

LAN chat without any software and network settings

Chat over the same LAN network among different computers always need a software to be installed. But now it is very easy to do the same without using any software or network settings. Mainly at office or home we have different computers are connected over LAN and have same IP. In this case we just have to open the browser and go to a particular URL WiFi Chat. It will open a text box to enter chat text. If any other user (computer) in the same network and using same IP open the same URL from browser then that user also see the chat text box. In this way different user can text chat over LAN.

Very simple and easy at all. This will be an open chat, so, no personal or confidential chat please.

This is completely an online application which works via Browsers only. You just need to open the link

Continue Reading

Transitional mouse hover effect in CSS

Presently we are very much conscious about the look and feel of our blog or website. For different reason we use hyper link text or block to highlight different section. Let’s see, we can draw this by any other way without using JavaScript or jQuery. Here I will explain a simple transitional mouse hover effect with the help of purely CSS.  Check this screen shot.



In the screen shot you can see the blue background effect on normal condition and the purple background effect on mouse hover. But this is not the trick. The changing of the colour will happen with a transition effect from light blue –> light purple –> Original purple colour within 0.5 second time span.

This is the simple HTML block text where I have put the hyper-linked text inside a DIV and main part of the CSS which calls the transitional effect.

If you have any idea to make this script more cool, please post your comment here. I have tested this script on latest version of Firefox, Google Chrome, Opera, Safari and Internet Explorer 9 and it is working fine. Please don’t ask for any update of this script for Internet Explorer 7 or prior versions as those engines do not support CSS3.

Continue Reading