Find us on facebook

Jun 25, 2014

Web Service to send user profile details to Android IOS - YII

public function actionGetUserProfileData() {
   
 $this -> layout = false;
 header('Content-type: application/json');

  $uid = $_GET['uid'];
 
   $profiles = Profiles::model()->findByPk($uid);
    $userProfileData = array(
    'firstname'    => $profiles->firstname,
    'street_address'  => $profiles->street_address,
    'city'     => $profiles->city,
    'contact_no'   => $profiles->contact_no,
    'country_code'   => $profiles->country_code,
   
   );



 echo CJSON::encode($userProfileData);
 Yii::app() -> end();


}

No comments:

Post a Comment