Follow by Email

Monday, September 8, 2014

Creating Restful Services/API using the Slim Framework for PHP || Calling API using Jquery

I was trying to create Rest Api using PHP , then i came across this Slim framework for php, which lets us create powerful APIs.

This below link shows how to create RESTful API using Slim framework and also how to call that api using Jquery.

Friday, September 5, 2014

PHP :: calling from one controller action method to another controller action method

hi in this post i will show how to call from one controller action method to another controller action method 


class Welcome extends CI_Controller {

public function index()
              $this->fcTest(); //calling another method
              $this->fcTest2();  //calling another method
        public function fcTest()
        public function fcTest2()

Php Codeigniter :: calling controller function from view button click using Jquery AJAX

Hi in this post i will how to call a controller action method from view. In view button click event we will make a ajax call to controller method.

View :

<script type="text/javascript" src=""></script>
function AjaxCall(){
type: "post",
url: "http://localhost/phpProj/index.php/usercontroller/method1",
cache: false,
data: $('#userForm').serialize(),
success: function(json){
var obj = jQuery.parseJSON(json);
alert( obj['STATUS']);

}catch(e) {
alert('Exception while request..');
error: function(){
alert('Error while request..');
<form name="userForm" id="userForm" action="">
<table border="1">
<td valign="top" align="left">
Username:- <input type="text" name="userName" id="userName" value="">
<td valign="top" align="left">
Password :- <input type="password" name="userPassword" id="userPassword" value="">
<input type="button" onclick="javascript:AjaxCall();" value="Submit"/>


class usercontroller extends CI_Controller {

  public function method1() {
$userName =  $_POST['userName'];
$userPassword =  $_POST['userPassword'];
$status = array("STATUS"=>"false");
if($userName=='admin' && $userPassword=='admin'){
$status = array("STATUS"=>"true");
echo json_encode ($status) ;



Monday, September 1, 2014

Microsoft SQL Server vs. MySQL vs. Oracle Comparison

Hi below is the comparison of the Top 3 Widely Used Databases around the Globe :

Basic Highlights :

1. Microsoft SQL Server : 


  • Rich GUI
  • Great Performance
  • Easy to Use
  • Built-in BI Tools
  • Works well with .Net


  • Free Version Supports only 10 GB of Database
  • The Paid Version is costly

2. MySql


  • Free 
  • Works well with PHP
  • Large Community
  • Runs on Any OS


  • no built in tools
  • Sometimes troubleshoot consumes more time due to lack to tools
  • Features are less compared to Oracle and Sql Server

3. Oracle

Pros :

  • Everything is under Transaction, so need to commit every-time
  • Runs on Any OS
  • Works well with Java
  • Good on Performance, Highly Scalable


  • GUI is not that great compared to MS Sql Server
  • Expensive
  • More configuration

Detailed Comparison:

Microsoft SQL Server vs. MySQL vs. Oracle Comparison