Skip to main content

Posts

How to render data using Ajax Cakephp

 Controller Code if(!empty($conditions)){             $this->paginate = array('limit'=>10,'order'=>'Admin.id desc');                   $adminDetail = $this->paginate('Admin',$conditions);                $this->set('adminDetail',$adminDetail);             if($this->RequestHandler->isAjax()){                 $this->layout = '';                 $this->autoRender = false;                            $this->render('admin_index');                  ...

How to validate form using jQuery without plugin and submitHandler method

How to validate form using jQuery without plugin and submitHandler method  Include jQuery validate library i.e  jquery.validate.js 1.How to ignore title in validation $("#form").validate({ ignoreTitle: true }); OR $('#addUser').validate({ rules: { 'data[Member][password]': {   required: true,  minlength: 6 },   'data[Member][cnf_pass]': {  required: true, equalTo: '#password' }, 'data[Member][contact_no]': {  number: true,  }, messages: {                   "data[Member][contact_no]": {  number: 'Only Numeric Value.'  }              }          }       }); Email validation unique $("#email").rules('add',{remote:ajax_url+'Members/check_email', messages: {remote: "Email address already exist...

Join 3 tables in codeigniter

Join in codeigniter Join 3 tables by codeigniter $query = ee()->db->select('b.id,b.rec_date,b.status,b.member_id, b.merchant_name, b.order_number, b.shipping_company, b.tracking_number,b.optional_service, b.inspected, c.first_name, c.last_name, c.mailbox_number,d.group_title as membership') ->from('exp_incoming_order b') ->order_by('b.id','desc') ->join('exp_members c', 'b.member_id=c.member_id and '.$whereCond) ->join('exp_member_groups d', 'd.group_id=c.group_id') ->limit($this->perpage, $rownum) ->get();

Google login Api with php

How to create Google login Step: 1 Go to this url https://cloud.google.com/console Step 2: Create a project Step 3: Enter the project name Step 4: Now on google+ api Step 5: Now click on credentials and click on create new id Step 6: Enter the redirect url Now put this code in header <?php $response_type1 = "code"; $client_id1 = "38789626348.apps.googleusercontent.com"; $redirect_uri1 = "http://example.com/Homes/user_google_login"; $scope1 = "https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile"; //$scope = "https://www.googleapis.com/auth/userinfo.profile"; $state1 = "access"; ?> <script type="text/javascript"> function student_google_login(){ window.open("https://accounts.google.com/o/oauth2/auth?response_type=<?php echo $response_type1;?>&client_id=<?php echo $client...