Example #1
0
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $question = $_POST['Qa']['question'];
     $username = $_POST['Qa']['username'];
     if (Yii::app()->request->isAjaxRequest && $question && $username) {
         Qa::addRecord($username, $question);
         Yii::app()->end();
     }
 }