Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Tuesday 24 May 2016

How to disable back button in browser using javascript

How to disable back button in browser using javascript


1) If you are using some Form-Submission page and want to don't allow the user to back their previous page, then you must use this script. 


* Browser will set the history each time you visited any page, even if you are using "Private Browsing", but the history is not shown in history bar(Because you can customise the setting for storing history in private browsing).
This script will set the time for storing histrory  is 'ZERO', logically you can't do anything in 'ZERO-TIME'.

 You just copy and paste this code before closing the <head> tag.  


    <script type = "text/javascript" >
   function preventBack(){window.history.forward();}
    setTimeout("preventBack()", 0);
    window.onunload=function(){null};
     </script>

This script will overwrite attempts to navigate back and forth with the state of the current page.

2) If you are not just using  Form-Submission page and want to don't allow the user to back their previous page, then you can use this script. 

Note* This script remove the extension of that particular page (eg. abc.php -> abc).

This script will overwrite attempts to navigate back and forth with the state of the current page.

    <script type = "text/javascript" >
history.pushState(null, null, document.title);
window.addEventListener('popstate', function () {
    history.pushState(null, null, document.title);

});
</script>

Monday 23 May 2016

Email Tips to Avoid Spam Filters

Email Tips to Avoid Spam Filters

One out of every six emails you send to prospects land in spam.  The spam filters on clients’ email addresses are a major issue for businesses today. 
Internet service providers (ISPs) tend to block spam or unsolicited emails with their spam filters based on the content in the sender’s name, subject line of the email and body of the email. Apart from these they also pay attention to the mailing patterns and the volume of mail sent. Spam filters have scores allocated for different mailing patterns and terms used in email. These scores determine when mail is sent to junk folders. The filters calculate the scores and when the number crosses a certain threshold, the server automatically sends the mail to spam.

The following are some common terms associated with email spam:   

Email Blocking: When an email client such as Yahoo, AOL, and Gmail block and bounce back the email at the receiving server, it is known as email blocking.
Spam Filters: Every email server has filtering software that identifies spam in the content or sender’s name or subject line of the email. The spam filter identifies spam trigger words and other indicators to eventually land  emails in a recipients spam folder.
Blacklist: A list of IPs and domain addresses that have been suspected of spamming are featured in blacklist.
Whitelist: A list of IPs, domain addresses and ESPs that have been approved to deliver emails.
False Positive: When a legitimate email is incorrectly filtered and lands in the spam folder.

The following are some important tips to avoid having your emails labeled as spam:  

Do Not:
  • Do not use words that express spam-like content such as Free, Money Back Offer Guaranteed and other similar terms (spam trigger words).
  • Do not use loud colors in the email body text, such as red or green.
  • Do not use all capital letters in the subject line or even within the body of the email.
  • Do not use exclamation signs or other punctuation marks more than once.
  • Do not use excessive symbols, use descriptive words instead. When you use dollar signs, make sure you do not overdo it ($$$).
  • Do not use overly prominent call-to-action buttons, for example, with loud colors or capitalization. Words such as ‘CLICK HERE’ are spam triggers and capitalizing them makes it worse.
  • Do not use bad HTML coding in email. Also, avoid converting Microsoft word files to HTML.
  • Do not use ‘Re’ or ‘Fwd’ in the subject line to trick recipients into thinking that the mail is a continuation of a previous conversation.
  • Do not use a lot of images that include text. If your email is HTML coded, avoid using one big image. Spam filters cannot read images so sometimes emails trick spam filters by embedding text in images. This practice is risky.
  • Do not use purchased lists. Sending emails to those who do not expect your correspondence is risky and can put your company’s reputation at stake.
  • Do not offer misleading claims in the subject line. Always deliver what you have stated in the subject line.
  • Do not use bulky attachments in emails. If you attach files in .jpg, .gif, .png and .pdf make sure the email also contains text content. Do not send emails attached with executable file types, such as .exe, .zip, .swf and so on.
Do:
  • Always include a ‘from’ address. Emails from unknown senders are immediately reported as spam. However, avoid ‘from’ addresses that look like54ds453w@yourdomain.com  or noreply@yourdomain.com.
  • Always include your physical mailing address and a phone number in the emails.
  • Keep your email size under 30kb. Avoid unnecessary text and images.
  • Provide an unsubscribe link within the email such that it is prominently visible to the recipient. This will help you avoid spam labeling. The unsubscribe link must be active within at least 30 days of sending the email.
  • Use permission marketing techniques or the double opt-in method to avoid sending emails to recipients that are likely to report them as spam. Both these methods ask for the user’s permission to receive your email. While permission marketing can be done in various ways, the double opt-in method refers to a customer opting-in to email newsletters on a form on your website and then confirming the opt-in with a confirmation link sent to his/her email.
  • Ensure that the design of your email templates identify clearly with your brand or website. Include your logo on the upper left corner or center of the email template. Avoid using stock template colors. Customize your email templates with your website’s theme.
The following are some methods to check if your email has spam content in it:  
  • SenderScore.org from ReturnPath will help you get to know what ISPs and email clients think about your emails. This lookup will tell you what you need to change to improve your emails. It shows you the overall health of your email programs.
  • Check if your IP is blacklisted using ReturnPath’s Blacklist Lookup or mxtoolbox’s Blacklist Check.
  • MailingCheck is free software that can be used check your email content for spam.
  • IsNotSpam is a free online spam checker that requires you to email your content to them and sends you an alert if the content contains spam triggering factors.
  • ProgrammersHeaven provides yet another spam check tool that requires you to fill in a form with the ‘from’ address, subject and body of the email.

Thursday 12 May 2016

PHP 5 ARRAYS

PHP 5 Arrays

An array is a Variable which can stores multiple values in one single variable:

In PHP, there are three types of Array:-
1) Indexed Array (Array with a numeric index).
2) Associate Array (Array with Named Keys).
3) multidimensional Array (Array containing one or more array).

                                          INDEXED ARRAY


Syntax:-
    Case1:    $Array=array("aaa","bbb");
                            OR
    Case2:    $Array[0] = "aaa";
                  $Array[1] = "bbb";
Example:-

       <?php

        $Fruit=array("Apple", "Banana", "Mango");

        echo "I like ".$Fruit[0].", ".$Fruit[1].", ".$Fruit[2];

        ?>

OTPUT:-

       I like Apple, Banana, Mango

* Where [0],[1] and [2]... is Index of the array. Bydefault Index is start with  0.


                                                    ASSOCIATIVE ARRAY


 In this, two parameter passes i.e. one is "key" and other is "value".


Syntax:- 




Example:-

        <?php
         $Sharma=123;                
       $Array=array("Gopal"=>$Sharma,"Megha"=>'Parkar',  
      "Akshay"=>789);
       print_r($Array);
         ?>
OTPUT:-

      Array ( [Gopal] => 123 [Megha] => Parkar [Akshay] => 789 )          


* Where "Gopal","Megha","Akshay" are KEY and "123","Parkar","789" are VALUE for the particular KEY.



                                    MULTIDIMENSIONAL ARRAY


It is the part of the PHP-Advance, in which Array have more than one Row and Column.


Example:- Suppose you want to store Student Name, Student Age, Student Roll Number.

         <?php
                    $Student = array
          (
               array("Gopal",21,11068),
               array("Shayam",23,11069),
               array("Akshay",22,11071),
               array("Tuneer",25,11123)
           );

/*Now the two-dimensional $Student array contains four arrays, and it has two indices: row and column.
To get access to the elements of the $Student array we must point to the two indices (row and column):  */
          echo $Student[0][0].": Age: ".$Student[0][1].", Roll No: ".$Student[0]             [2].".<br>";
          echo $Student[1][0].": Age: ".$Student[1][1].", Roll No: ".$Student[1]             [2].".<br>";
          echo $Student[2][0].": Age: ".$Student[2][1].", Roll No: ".$Student[2]             [2].".<br>";
          echo $Student[3][0].": Age: ".$Student[3][1].", Roll No: ".$Student[3]             [2].".<br>";
        ?>OTPUT:-
          Gopal: Age: 21, Roll No: 11068.
          Shayam: Age: 23, Roll No: 11069.
          Akshay: Age: 22, Roll No: 11071.
          Tuneer: Age: 25, Roll No: 11123.



* Where First Index is ROW while the Second Index is Column.


                                  

                                     COUNT FUNCTION

THE COUNT FUNCTION IS USED TO COUNT THE LENGTH OF THE ARRAY and give an integer answer.


Example:- 

           <?php 
             $Array=array("RAM","Shyam","Aman","Yaman");
             echo count($Array);
           ?>
OUTPUT:-
           4