Welcome Guest, Not a member yet? Register   Sign In
on adding value in database last values is repeated as many times as rows are in table.
#4

[eluser]Evil Wizard[/eluser]
how are you looping through the candidates array?
Code:
<? foreach($candidates as $candidate):?>
    <tr>
      <td>
           <a href="&lt;?= site_url(); ?&gt;index.php/projects/rollout_details/&lt;?=$candidate['pid']; ?&gt;/&lt;?= $candidate['id']; ?&gt;"> &lt;?= $candidate['code']; ?&gt;</a></td>
      <td>&lt;?=$candidate['latitude'];?&gt;</td>
      <td>&lt;?=$candidate['longitude'];?&gt;</td>
      <td>&lt;?=$candidate['isactive'];?&gt;</td>      
      <td><a href="../candidate_active/&lt;?=$candidate['id']">Mark as Active</a></td>
    </tr>
&lt;?endforeach;?&gt;
something like that should only produce rows for the elements withing the candidates array.


Messages In This Thread
on adding value in database last values is repeated as many times as rows are in table. - by El Forum - 05-28-2009, 06:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB