public function actionGetProf() {
try {
$user_id = $_POST['user_id'];
$lastname = $_POST['lastname'];
$firstname = $_POST['firstname'];
$street_address = $_POST['street_address'];
$floor = $_POST['floor'];
$city = $_POST['city'];
$apartent_name = $_POST['apartent_name'];
Profiles::model()->updateByPk($user_id, array(
'lastname' => $lastname,
'firstname' => $firstname,
'street_address' => $street_address,
'floor' => $floor,
'city' => $city,
'apartent_name' => $apartent_name,
));
$msg = CJSON::encode(array( array('success' => "success", 'message' => 'exception', 'user_id' => $Profiles)));
echo $msg;
} catch (Exception $exc) {
$msg = CJSON::encode(array( array('success' => "false", 'message' => 'exception')));
echo $msg;
}
}
try {
$user_id = $_POST['user_id'];
$lastname = $_POST['lastname'];
$firstname = $_POST['firstname'];
$street_address = $_POST['street_address'];
$floor = $_POST['floor'];
$city = $_POST['city'];
$apartent_name = $_POST['apartent_name'];
Profiles::model()->updateByPk($user_id, array(
'lastname' => $lastname,
'firstname' => $firstname,
'street_address' => $street_address,
'floor' => $floor,
'city' => $city,
'apartent_name' => $apartent_name,
));
$msg = CJSON::encode(array( array('success' => "success", 'message' => 'exception', 'user_id' => $Profiles)));
echo $msg;
} catch (Exception $exc) {
$msg = CJSON::encode(array( array('success' => "false", 'message' => 'exception')));
echo $msg;
}
}
No comments:
Post a Comment