Friday, 9 October 2015

Send email with attachment using Codeigniter

How to send email with attachment using Codeigniter

Step 1 : we want to create the front end on view folder. just copy and paste the below code.


 <form action="<?php echo site_path?>career/mail_resume" enctype="multipart/form-data" method="POST" class="col s12">  
   <input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash();?>" />  
    <div class="row">  
     <div class="input-field col s6">  
      <input id="first_name" type="text" name="fname" class="validate">  
      <label for="first_name">First Name</label>  
     </div>  
     <div class="input-field col s6">  
      <input id="last_name" type="text" name="lname" class="validate">  
      <label for="last_name">Last Name</label>  
     </div>  
    </div>  
    <div class="row">  
     <div class="input-field col s6">  
      <input id="icon_telephone" type="tel" name="mob" class="validate">  
      <label for="icon_telephone">Mobile</label>  
     </div>  
     <div class="input-field col s6">  
      <input id="email" type="email" name="email" class="validate">  
      <label for="email">Email</label>  
      </div>  
    </div>  

Thursday, 8 October 2015

Show Countries, States, Cities, on Dropdown box using JQuery

How to show Countries, States, Cities, on Dropdown box using JQuery

The Given Code for auto load Countries, State and Cities using JQuery


 <select class="countries" id="countryId" name="country">  
   <option value="">Select Country</option>  
 </select>  
 <select class="states" id="stateId" name="state">  
    <option value="">Select State</option>  
 </select>  
 <select class="cities" id="cityId" name="city">  
   <option value="">Select City</option>  
 </select>  

Wednesday, 7 October 2015

Check the IP Address of visitors using PHP

How to check the IP Address of visitors using PHP

Just copy the below code.

 function getRealIpAddr()  
      {  
           if (!empty($_SERVER['HTTP_CLIENT_IP']))  //check ip from share internet  
           {  
            $ip=$_SERVER['HTTP_CLIENT_IP'];  
           }  
           elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))  //to check ip is pass from proxy  
           {  
            $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];  
           }  
           else  
           {  
            $ip=$_SERVER['REMOTE_ADDR'];  
           }  
           return $ip;  
      }  
IP Tracker

Tuesday, 6 October 2015

Add the checkbox value cart using Jquery

How to add the checkbox value cart using Jquery

Step 1 : First we will create the html file with the check box
 <div class="bfmenu">  
 <h3>Breakfast</h3>  
 <h4>SWEETS</h4>  
 <div id="widspc">  
 <div class="squaredOne">  
 <input type="checkbox" value="Kesari" id="item1_1" name="check1[]" />  
 <label for="item1_1"><h5 class="txt">Kesari</h5></label>  
 </div><!--/.squaredOne-->  
 </div><!--/.widspc-->                                                             
 <div id="widspc">                             
 <div class="squaredOne">  
 <input type="checkbox" value="Pineapple Kesari" id="item2_1" name="check1[]" />  
 <label for="item2_1"><h5 class="txt">Pineapple Kesari</h5></label>  
 </div><!--/.squaredOne-->  
 </div><!--/.widspc-->