cakephp-1

How to setup and configure cakephp for beginners

Today this post is for cakephp beginner for those people who wants to switch from corephp to any framework, Moving from corephp to framework is good idea because when you will start working on framework your development will be fast because frame works pre-defined plugins and libraries. which we used to create in corephp. There…

Read More
composer-1

What is composer in php

Composer in php with example of how to use it in Codeigniter project. Last night i was studying about composer in php, It works great like npm package.json,Now time to start your next php application with composer. What is composer? Composer is a tool for dependency management in PHP. It allows you to declare the…

Read More
angular-routing

Angular.js routing and templating example

How to create routing in angular.js Now a days we are using angular.js for creating one page application, So in this post i am going to explain you that how can we create routing in angular.js, This is a very basic tutorial to create templating using angularjs, we started using angularjs over core jquery because…

Read More

Image upload without refresh page in php and jquery

This is a simple php and jquery based image upload script to upload image without page refreshLets see how this works Create a html page with some jquery script index.html <html> <head> <title>Image upload without refresh pagetitle> head> <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”>script> <script type=”text/javascript” src=”https://cdnjs.cloudflare.com/ajax/libs/jquery.form/3.51/jquery.form.js”>script> <script type=”text/javascript” > $(document).ready(function() { $(document).on(‘change’, ‘#photoimg’, function(){ $(“#preview”).html(”); $(“#preview”).html(”); //download load…

Read More

How to create paging and shorting in cake php

In this post we are going to learn how to create paging and shorting in cakephp list page. Create controller PostsController.php class PostsController extends AppController { var $name = ‘Posts’;   function inbox() { $this->paginate = array( ‘conditions’ => array(‘Post.status’=>’1′),’limit’ => 10,’order’ => array(‘Post.created_date’=>’desc’ ) ); $data = $this->paginate(‘Posts’); $this->set(‘result’, $data); } class PostsController extends…

Read More

How to upload file in cakephp without refersh page

Here we are going discuss about how to upload image or file without refresh page in cakephp and jquery. Create controller in cakephp ProfilesController.php class ProfilesController extends AppController { var $name = ‘Profiles’; public $uses = array(‘Profile’); function changeprofilephoto() { $profile_id = “14”; // $path = “../../app/webroot/profilepic/”;//set path $valid_formats = array(“.jpg”, “.png”, “.gif”, “.bmp”, “.jpeg”);//…

Read More
Top