title: I want to display data when i click on customer name form dropdown list it will display only that customer's message and entry date
body: <p>My code works properly, it is display all messages and entry dates. I want to display message and entry date when I select customer name from drop down list. </p>
  
  <p>Here is my controller <code>CustomerlifecycleController</code></p>
  
  <pre><code>    public function actionCustomerlifecycleanalytic() {                           
       $customername = Customer::model()-&gt;findall("store_id='" . Yii::app()-&gt;session['store_id'] . "'");
       $customerlifecycle = CustomerLifecycle::model()-&gt;findAll();
       $this-&gt;renderPartial('customerlifecycleanalytic', array( 'customername' =&gt; $customername, 'customerlifecycle' =&gt; $customerlifecycle), false, true);
  }
  </code></pre>
  
  <p>Here is my view file <code>customerlifecycleanalytic.php</code>
  Dropdown list
  Customer name fetch from customer model
  and there is column name <code>id</code> for customer</p>
  
  <pre><code>   &lt;select class="form-control selectpicker customerfilter"&gt;
          &lt;option value=''&gt;Select Customer&lt;/option&gt;
  
          &lt;?php
          if (isset($customername)) {
              foreach ($customername as $customernames) {
  
                  echo '&lt;option value="' . $customernames['id'] . '" &gt;' . $customernames['firstname'].'&amp;nbsp'. $customernames['lastname']. '&lt;/option&gt;';
              }
          }
          ?&gt;
      &lt;/select&gt;
  </code></pre>
  
  <p>Message and entry date fetch from <code>Customerlifecycle</code> model there is column name is <code>customer_id</code>
         
          
  
  <pre><code>    $msg = '&lt;li {classstr}&gt;
                      &lt;div class="tl-circ"&gt;
                      &lt;/div&gt;
                      &lt;div class="timeline-panel"&gt;
  
                          &lt;div class="tl-body"&gt;
                              &lt;p&gt;
                                 {msg} on {date}&lt;/p&gt;
  
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;';
  
      $cnt = 0;
      $htmlstring = '';
      foreach ($customerlifecycle as $key =&gt; $row) {
          $htmlstring .= $msg;
          $classString ='';
          if ($cnt % 2 == 0) {
              $classString = " class='timeline-inverted' ";
          }
          $htmlstring = str_replace("{classstr}", "$classString", $htmlstring);
          $htmlstring = str_replace("{msg}", "$row-&gt;message", $htmlstring);
          $htmlstring = str_replace("{date}", "$row-&gt;entrydate", $htmlstring);
          $cnt++;
      }
  
  
     echo $htmlstring;
      ?&gt;
  </code></pre>
  
  <p></p>
  
  <p>My code is already running completely but I want when I select customer name form drop down list at that time it will display only that customer's message and entry date.</p>