title: First Form not displayed being in loop while others display
body: <p>I am working on an existing application. I am encountering a strang issue. Here is my loop.</p>
  
  <pre><code>&lt;tbody&gt;
  &lt;?php if($results-&gt;num_rows &gt; 0 ): ?&gt;
      &lt;?php foreach ($results-&gt;result() as $row1): ?&gt;            
          &lt;tr&gt;
              &lt;td class="td_data"&gt;&lt;a href="&lt;?php echo site_url('campaign/search/customer_name/'.$row1-&gt;customer_name)?&gt;"&gt;&lt;?php echo $row1-&gt;customer_name; ?&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td class="td_data"&gt;&lt;?php echo $row1-&gt;postcode; ?&gt;&amp;nbsp;&lt;/td&gt;
              &lt;td class="td_data"&gt;&lt;a href="&lt;?php echo site_url('campaign/search/company/'.$row1-&gt;company);?&gt;"&gt;&lt;?php echo $row1-&gt;company; ?&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td class="td_data"&gt;&lt;?php echo $row1-&gt;enquiry_status; ?&gt;&lt;/td&gt;                
              &lt;td class="td_data"&gt;&lt;?php echo $row1-&gt;form_source; ?&gt;&lt;/td&gt;
              &lt;td class="td_data"&gt;&lt;?php echo anchor('customer/edit/' . $row1-&gt;customer_id, 'Edit'); ?&gt;&lt;/td&gt;
              &lt;td class="td_data"&gt;
                  &lt;a href="javascript:;" id="member_login_link&lt;?php echo $row1-&gt;customer_id?&gt;"&gt;Login&lt;/a&gt;
                  &lt;?php $action   =   $this-&gt;config-&gt;item('front_site_url').'members/login';?&gt;
                  &lt;form id="member_login&lt;?php echo $row1-&gt;customer_id?&gt;" action="&lt;?php echo $action;?&gt;" method="post" &gt;
                      &lt;input type="hidden" name="username" value="&lt;?php echo $row1-&gt;username?&gt;"/&gt;
                      &lt;input type="hidden" name="password" value="&lt;?php echo $row1-&gt;password?&gt;"/&gt;
                      &lt;input type="hidden" name="submitted" value="yes" /&gt;
                  &lt;/form&gt;
                  &lt;script type="text/javascript"&gt;
                      $('#member_login_link&lt;?php echo $row1-&gt;customer_id?&gt;').click(function(){
                          $('#member_login&lt;?php echo $row1-&gt;customer_id?&gt;').submit();
                      });
                  &lt;/script&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;?php endforeach; ?&gt;
  &lt;?php else: ?&gt;
       &lt;tr&gt;
          &lt;td class="td_data"&gt;No Record Found&lt;/td&gt;
      &lt;/tr&gt;
  &lt;?php endif; ?&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p>This creates a list. And inspecting element displays this.</p>
  
  <p>Here is the result of firebug which is fine on all the elements except the first.</p>
  
  <p><img src="https://i.stack.imgur.com/3RRfj.png" alt="enter image description here"></p>
  
  <p>And here is the first row result</p>
  
  <p><img src="https://i.stack.imgur.com/jaVlm.png" alt="enter image description here"></p>
  
  <p>I am unable to understand why this is happening. I have checked on different browsers and all have same issue.</p>
  
  <p>EDITS:</p>
  
  <p>This list that is being generate has form in each row. clicking on Login opens a tabs and asks for username and password. But the first row does not have form tags so it is not opening tag.   </p>