To change views exposed date filter to month only.

 * Impliments hook_form_views_exposed_form_alter
function exposed_date_filter_form_views_exposed_form_alter(&$form, $form_state) {
   $view = $form_state['view']->name;
   $view_array = array('story', 'news');
   if(in_array($view, $view_array)) {
    // Switch date formatter to month only
     if($form['field_date_value_1']['value']['#type'] == 'date_select') {
          $form['field_date_value_1']['value']['#date_format'] = 'm';
         // Add extra validator to handle filter submit

Amazon Web Services(AWS) - Simple Email Service

Amazon Simple Email Service provides a simple way to send e-mails without having to maintain your own mail server.  This PHP class is a REST-based interface to that service.

First, you’ll need to create a SimpleEmailService class object:

For this first you need to get ses.php file -

require_once('ses.php'); $ses = new SimpleEmailService('Access Key Here', 'Secret Key Here');

How to convert simplexml object to array in php


1. First convert your xml data into an object using simplexml_load_string() function . 

   $xml = simplexml_load_string($xmlData);

2. The simplexmlelement class provides a method called children() which provides the children of an element.

        function xml2array($xml)


          $arr = array();

          foreach ($xml->children() as $r)


              $t = array();

              if (count($r->children()) == 0)


Find Difference between two dates using javascript

Hi All,

Following is the script to find the differences of two dates.
This sample script let you know which date is greater than another.

You could use jquery for the same as follows :

// if you have #from id for from date
var startDate = new Date(jQuery('#from').val().replace(/-/g, '/')).getTime();
// if you have #to id for from date
var endDate = new Date(jQuery('#to').val().replace(/-/g, '/')).getTime();

stored procedures in Mysql tutorial

Following is one of the sample of stored procedure created in mysql
whenever we create any store procuedure we need to make sure store procedure with same name must not be present in the database already.

DROP PROCEDURE `InsertingContactDetails`//

Following is the sample code to create stored procedure in default xampp database.
Create definer will define our store procedure variables as shown below which we can use
in our different blocks of stored procedure.

My first Developed theme

I have developed following theme using simple HTML and CSS template.

You can create any HTML theme into Drupal theme.

Just need to follow few steps.

I have used helper theme Zen in order to create this one and added the HTML and CSS template

for good look with it. :)


Good luck have fun..